As long as the key isn't in use you can use it.
http://windows.microsoft.com/en-us/windows-8/upgrade-product-key-only
If you bought Windows 8.1 or Windows 8, you can download and install Windows from this page using just your product key. You'll have the option to install Windows now, later, or using media with an ISO file.