It won’t clear out old locks, but I guess one way of doing that is by checking the age of an existing lock and deleting it when it’s over X minutes old.