Dear @Nextcloud 📱☁️💻,
If the official solution to a file getting randomly locked is to shut the whole server down and then manually edit the database, something's been done wrong. If this were to happen to a random non-admin user, they'd have no solution (other than pinging their sysadmin). The owner of a file should be able to manually clear its lock if necessary.