Nextcloud update failed - database is locked

I’ve been having problems with Nextcloud recently, with the new 3.0 client for windows not working at all (not sure if the server has something to do with it)
Just now I tried updating MIAB from v0.47 to v0.48.

Everything worked except for the Nextcloud step:

Updating system packages...
Installing system packages...
Initializing system random number generator...
Firewall is active and enabled on system startup
Installing nsd (DNS server)...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
bayes: synced databases from journal in 1 seconds: 372 unique entries (604 total entries)
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...

FAILED: sudo -u www-data php /usr/local/lib/owncloud/console.php app:enable user_external
-----------------------------------------
An exception occurred while executing 'UPDATE "oc_appconfig" SET "configvalue" = ? WHERE ("appid" = ?) AND ("configkey" = ?) AND ("configvalue" <> ?)' with params ["0.10.0", "user_external", "installed_version", "0.10.0"]:
SQLSTATE[HY000]: General error: 5 database is locked
-----------------------------------------