This sounds like one of those hotel type safes, where you have to put in a PIN to open it. It's not plugged in. It runs on batteries.
batteries die and corrode——same thing. Power goes out.