The issue isn't how the cells are locked, rather it is a matter of feeding the inmate population. The food that needs to be cooked can't be unless they have a non-electrical source. Secondly the food stock needs to be resupplied at some point in the VERY near future, depending on the size of the facility. And we need to consider the staff that is on hand at the time of an event. What if relief shifts aren't forthcoming due to being unable to travel due to conditions? At some point the 'system' breaks down. What do you do? Leave them in the cells to die? Release them on an already panicked public? No good choices.
Especially if you have the scnario like in the Christian Bale Batman movie were the avarage prisioner was a nut job. I would imagine a good few public would make like an ostrich and not even entertain the idea. Pretend it is not there until seen type of thing. I guess the moral thing to do with a prison full of nonces, rapists and murderers would be to pump the prison full of sleeping gas in the event of a cataclysmic event.