Clerics only need 1 hour to prepare spells. If there is no anti magic tools in the guard's arsenal I can cast command twice. Once to have him drop his keys so I can open my cell and the second have him approach where he enters my cell and I strangle him. After that I open every cell i can before the missing guard is noticed.