A door lock with an electrical component will fail to function if it doesn't have electricity, for example, if its battery runs out. If it is designed to fail secure, you won't be able to get through.
Provide a method to connect an emergency battery on the unsecured side. Such a battery would be in addition to a secured main battery or other power source. Someone worried about being locked out due to lack of power can carry an emergency battery to power the lock. Of course, after getting in, one should correct the problem on the secured side that caused the lock to lose power in the first place.
Or, if one doesn't have a battery on hand when locked out, obtaining a battery is often much easier than obtaining a locksmith or other means to bypass the lock.
Assuming standardization, the same carried battery can power locks in many different locations, so it saves space over carrying multiple emergency keys.
Possible standardizations: AAA battery, coin cell, micro USB socket for power (attach a phone external battery).
EmoticonEmoticon