The problem with this though is - why even have a lock in the first place?
Actually, I see this questioned/mentioned quite a bit. My answer is always the same, there is no problem. It's there because it belongs there.
So you have a temple, and certain areas are off limits to the general public or hold valuables, etc. Or they are private chambers. They are naturally locked. There may not be any immediate issue at the time the PCs are there, nor will they know whether there really is something valuable behind the locked door. It's up to them to decide if they will investigate or not.
Note that in these circumstances I still require a skill check. They don't know whether somebody might come down the hall while they're trying to get in. It may still take a few minutes to succeed. The lock may still serve it's purpose, which is to be a deterrent from somebody (like the PCs) entering.
While I understand the general reason why some DMs think they shouldn't put a lock if there's no immediate danger, that's really just the DM metagaming. The DM knows there is no immediate danger so is skipping a "boring" event. But, do the PCs remember to lock the door behind them? Are there any marks left that would alert the occupant that somebody entered without their permission? What if there's a reason for them to return to this door, and at that time there
is a time pressure or material cost to opening it. If the door should be locked and wasn't the first time, but now it is, why?
Also, if you hand-wave opening the lock, you're giving away the fact that there is no danger at that time. You're reducing the "fun" by doing so. If what you as the DM are choosing to include/not include is based on whether there will be any danger or material cost, then why include the room either?
To me, the world should make sense. Locks exist in the world to keep people out, or act as a deterrent to keep people out. A lock shouldn't exist/not exist based on whether it makes an interesting encounter for the PCs, nor because the DM knows that there is no risk at this point in time. It should exist/not exist because it makes sense in the world the characters live in and are exploring.
One of the three pillars of D&D is exploring. The process of exploration is mundane. Anything behind a locked door or a trapped hallway could be interesting. It keeps the players thinking, acting. Maybe they missed something important. Maybe not. But the mundane accentuates the unusual. They've explored what appears to be the barracks, and the first 8 doors to private sleeping chambers have been locked, but the 9th is not. Does that mean something? There was nothing other than personal effects in any of the others, and this is no different. Maybe somebody just forgot to lock the door. Maybe it's a trap. Maybe there was something they missed in the other rooms.
The exploration of the rooms can be quick or not. We don't actually have to wait the time indicated by a failed skill check. And if the locks are all similar, simple, and within the passive ability of the PC in question, it's OK to indicate that these are all pretty similar locks, and you're able to get this one open more quickly as a result and go with the passive ability. But I wouldn't hand-wave the first lock, and it would be clear that the other locks are opened because of their skill.
The same thing applies to things like travel. Sure, in some cases it's worth jumping from one location to another. But if you include those portions from time to time, it gives them the sense that they are arriving somewhere when they do. My group spent several months (real time) exploring some catacombs, and had one goal when doing so. Everything else was trying to find that one goal. Of course they found other things, and learned other things on the way, not to mention had numerous encounters and found some treasure. But it was a long time looking for one thing. And finding it was a huge deal because of the time and effort they put into locating it. There was also a time element in that others were looking for the same thing. But the catacombs were huge (based on the maps of the ones in Rome and Paris), and nobody knew where within them they needed to look.
Now they were just entering another dungeon. Once they explored the ruins of the temple and found the entrance to the dungeon, they went back outside to see the sun one last time because they aren't sure when they'll see it again.
Ilbranteloth