A dream with a lock suggests that you are experiencing obstruction or being kept out of something, you are unable to get what you want, or you feel there is no way forward in some part of your waking life. Alternatively, the dream may imply that you feel a part of yourself is locked up such as your emotions or self-expression, your choices are not appropriate, or you are looking for freedom from something or someone.
If the lock is broken or not working properly in the dream then this suggests that you are feeling emotionally or physically insecure, or helpless in some part of your waking life. To be fixing a broken lock implies that you feel your personal space has been invaded or violated.
If you find a door is locked in a dream then it implies that there is a better or more suitable direction or way of doing something in some aspect of your life.
If you need to use force on a lock in a dream then this suggests that you need to release your inhibitions in some part of your life.
If a part of your body is locked in the dream then this suggests that you are experiencing pressure in some aspect of your waking life.