When you check into most hotels nowadays, they give you a magnetic card to get into your room. If you ask, they'll give you a second one free of charge. Get one, and keep them in different pockets.
+ If you lose one, you'll have a spare.
+ If one gets demagnetized, you'll have a spare. That's why you should keep them in different pockets - the magnetic trauma is less likely to affect both that way.
+ You can give one to someone else who needs to get into your room.
None of these would be a big hassle, but it's so easy to get an extra one that you may as well do so.