|I am not sure what type of Windows 7 activation code could expire.|
The original OEM installation that HP put on your computer does not expire.
Your Factory Restore is completely independent of your OS installation and as long as you have not overwritten or damaged the recovery partition, F11 as indicated in response #1 should start the recovery console you will need to launch the factory restore.
Understand that everything on the hard drive will be lost so if you have any files that are on the drive that you do not have a back up for, DO NOT PROCEED until you have taken steps to recover those files. they will be much harder to recover later. If the hard drive still works, use a DVD prepared with a Live Linux (like Puppy Linux) to access the hard drive from outside of Windows and save all that you may need. Then go ahead with your restore.
You have to be a little bit crazy to keep you from going insane.