I've had sporadic problems with keycards around the world. The old type, with the holes in the card work fine, but are found in some scattered older hotels these days.
Getting two keycards works fine, of course, as long as you don't store them together. I once had a hotel where ever other day, I'd have to get a new key card, as it wouldn't work when I went up. As long as the hotel is programming the cards right (for your entire stay), then this shouldn't happen.
You can always try rubbing the magnetic strip on your pants, that lets me in about 50% of the time.