Hi Laur. I'm Greg, an installation specialist, 10 years Windows MVP, and Volunteer Moderator here to help you.
What I'd do in that situation is save a System Image backup of the Windows partitions using free Macrium as shown here:
https://www.howtogeek.com/howto/7363/macrium-re...
Then wipe the drive with Diskpart Clean Command from Windows installation media before sending it in: https://www.tenforums.com/tutorials/85819-erase...
When it returns restore the image to the hard drive following http://reflect.macrium.com/help/v5/how_to/rescu...
Even if you swap in another hard drive, there's no reason to use a new key to activate since the PC came with a Product key embedded in the UEFI firmware chip on the motherboard that lasts for the life of the motherboard, to reinstall Windows as often as you want, on any drive you want, and in whatever way you want.
So you could swap in a drive to send in and reinstall Windows but they can also be fussy about it not having a Factory install if the drive isn't wiped. So you may need to make HP recovery media to restore the new hard drive as shown here:
http://support.hp.com/us-en/document/c04758961
So the best option is clearly to save a system image backup, wipe the drive an send it back blank which is common accepted practice for returning PCs under warranty.
I hope this helps. Feel free to ask back any questions and keep me posted. I will keep working with you until it's resolved.
________________________________________________________
Standard Disclaimer: There are links to non-Microsoft websites. The pages appear to be providing accurate, safe information. Watch out for ads on the sites that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the sites before you decide to download and install it.