if it is an OEM system the key is most likely tied into the BIOS of that particular system.
if it is an install disk for Windows 7 that has the included serial you should be able to install Windows 7(guessing this what you mean by old), activate it, and then upgrade to Windows 10. a new serial will be generated for your 10 install and Microsoft will validate it.
XP & Vista do not allow free upgrade.