Consider reading some posts around keys for mazdas. Just because the dealer is sending you a key, does not mean it will work for your 5.
From the factory, the keys were designed to work as a pair. 2 working keys are needed to program another key to start the 5. As you only have one, you need to buy another ($150.00), then have the dealer (no one else likely has the software to program it) program the new key to work with your 5 (at least $150.00 but likely more).
Do not be fooled by the dealer's ability to cut the key to fit the door/ignition. The key has an internal transponder the can only be programmed to work with your 5 if you already have 2 working keys.
Good luck, and then buy at least another transponder key (non-fob for about $20 from the dealer).
Remember that a single lost key will put you right back at the start of this hassle, if you only have two transponder keys.
Sounds like a huge pain, and it is if you buy a 5 with only one key.