When it comes to safes, a lockout is never a good situation. It can be very costly to open and then repair the safe. Regular service is the best way to minimize any lockout situations. If a safe is attacked, it’s designed not to open (or at least be very difficult) without a professional for a reason. So keep this in mind and call a professional to service your safe. Most manufacturers recommend once a year, but if the safe is only used a couple times a month and not every day, then every 2 years is acceptable.
At the very least, be sure to replace the batteries regularly. How often depends on the amount of use it gets. Once a year is usually plenty, replace them when you replace your smoke detector batteries. Avoid using cheap batteries, get the good ones. I have been called out to a malfunctioning safe many times, only to discover the customer has replaced the batteries with a discount brand. Duracell Procell Batteries is what we use and what many manufacturers install on new electronic safe locks. Yes, we carry Procell at our shop.