You don't need to know the key anymore. When you installed win 10 on the PC the first time, it was recorded on a Microsoft server alongside the details of your PC
When you reinstall it and get to screen asking for a licence, click the link that says "I don't have a key" and win 10 should auto activate once its installed.