"occ file:scan --all -v" terminates with errorr

You use Redis for file locking? As far as I remember the locked files will be released automatically after 24 hours. You can also unlock them manually by clearing the related database table: File is locked - how to unlock