Which app are you using? In the classic app, you can do anything you like to do with locks, they basically have the same rules as a light switch.
In the new app, you can’t do anything at all with locks except toggle them lock/unlocked on the things list. You cannot unlock them with any automations.