I recently started having the warning beep anytime I had shut off the ignition, removed the key and opened the drivers door. The remote locking function did not work, which was very inconvenient.
Sometimes I could exit the door with it not beeping. I spent some hours trying to emulate when it did not beep, but to no avail.
I took the car into the local Mazda Dealer (Fairview Motors in Hamilton, NZ) and asked that they run a scan on the vehicle. I booked it in accepting the scan would cost $200.
When I went to pickup the vehicle I got an invoice for $104 and an estimate for replacing the ignition block of $1214.
No scan was done, so I did not get charged for that.
A couple of days later I discussed what had happened and found the reason the ignition block change was because the key was not lining up properly in the lockset on extraction. I attributed this to wear on the key face.
To test my theory I maintained pressure on the lockset when removing the key by pulling upward on the handle end of the key, which ensured the key engaged with the lockset on withdrawal.
I then tried the spare key which had been cut months before but never used and it worked fine.
Takeaways:
1. Keep an unused key available. Don't rely on your wife's copy.
2. Expect the Dealer is going to give you the best advice (read profitable) and not the simplest answer.
I hope this helps someone.
Cheers
Bernard