The two locked doors in the prison area seem to stay locked, even after you've rescued the pets. I've never been able to open them and I can't see anything in the rooms, so I wouldn't worry.
The room with lots of pumpkins in only seems to open AFTER you have turned the second switch in the area above ON. I believe if you turn the third and further switches on, the pumpkin room seals itself again.
Million to One chances happen 9 times out of 10. Terry Pratchett