If a locksmith does not have the ability to program chipped keys, then the vehicle will have to be towed to the dealer to have the keys made and programmed.
Ford has a form you would fill out in addition to providing proof of ownership and matching photo ID. Assuming the vehicle is 2005MY and newer we can make the key based on the code stored in Ford's database.
Mazda is the same, but they have key codes back to the 80s assuming the original selling dealer entered them in the system.
The above does not apply if you have ever had the vehicle re-keyed. Usually people do not keep or bother remembering the new key code when that happens, and a cylinder will have to be read and a new key made with that process, and then programmed.