If you’re the only one backing up to this repo, and you’re absolutely sure you’re not backing up when the script runs, then there shouldn’t be any problem.
I do know that restic won’t clear an active lock - see this thread. One thing to note is that they definitely don’t recommend manually removing anything from the locks folder.
I have restic running in a Windows environment with about 80 clients. What I did in my maintenance script was make each user backup script check for an “unlocked” file. If the file exists, run the backup. If it doesn’t, wait X amount of time, try again. The maintenance script (see this thread) removes the unlocked file, waits about 24 hours for all the backup jobs to finish and notice the “unlocked” file is gone (I typically run it on a Friday afternoon before the weekend), then calls restic unlock, then checks for the existence of any files under /path/to/repo/locks, if they exist it waits ~15m then runs restic unlock again, waits, runs again, etc until it clears, runs my pruning jobs, then recreates the “unlocked” file. Just a thought, if it would be useful to you.