Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.
The batteries, if left in the safe for a period of years, almost certainly leaked, and corroded or stained the metal terminals in the battery compartment.
Therefore, cleaning of the ends (at least) of those terminals, is advisable, and might allow the safe to 'come alive' and perhaps also open, once again.
But if not opened in 5 years, and not lubricated either, you may perhaps expect some difficulty in getting the safe open even if the lights etc. do come on.
Let me know how it looks, and what results you get, please. Thanks.