Hi
I'm guessing that if you computer is that old putting Windows 10 on it probably isn't a good idea, but here's information about how to de-register and re-register your product key in Windows 7.
How To Uninstall Your Windows Product Key Before You Sell Your PC
I'm not guaranteeing that this works since I've never tried doing this myself.
And it may depend on the type of installation that's on your laptop, i.e. OEM etc.
I've also read that just installing Windows 7 on the new computer will work it you call Microsoft and tell them that you scraped your old computer and moved the OS to a new one.
But if you do get it to work, it might be better to just stick with Windows 7 on your computer rather then upgrading to Windows 10...