Going on Microsoft's Activation in Windows 10 Guide they say you would have to call customer support in such a situation.
Activating Windows 10 after a hardware configuration change
If you upgraded to Windows 10 using the free upgrade offer and then made significant hardware changes to your device, such as replacing the motherboard, Windows 10 might no longer be activated. For help on how to activate your device, contact customer support.