Yes, you can.
The key is not in the MB Bios, it was in Microsoft Services Centre.
No need to re-install Windows 10, just insert the HDD/SSD to the new motherboard. You can go to the Windows.
When you go into internet. Windows will prompt you to input the key and re-active by the MS Centre automatically. Confirmation code through your mobile phone is needed, MS will notice you.