Go to the Mazda dealer and provide them with the VIN number and they should be able to get a key for you.
If the key is stuck in your 1998 Mazda 626, the steering wheel column may be locked. To remove the key, adjust the steering wheel and turn it clockwise to the proper position. Then try removing the key.
i have no clue i have the same problem with my Mazda 1999 626
Try opening your trunk with key.
Driver side door must be successfully unlocked by the door key(I have a separate ignition key).
Take it out of reverse.
Ask its owner for the key.
Take out one of the key barrels - from either doors or trunk lid and you should find it on the lock cylinder itself.
originalkeyless.com they have the remote and the programming for Mazda 929's
You can find the code on the passenger side door lock. It will have to be removed to see it.
The Mazda Millenia never had a chip in the key so yes the aftermarket key will work however it will need to be cut by a locksmith or the dealer.
Read the owners manual that came with the car. Key battery replacement details are in there.