In the scene with the Sheriff lets Jessie out of the cell, it's clear that the door to the cell had no lock. This becomes evident when the Sheriff pretends to slide a key into the, non-existent, lock and has to quickly fake his way through it.