Issues with deleting, moving, and renaming files - External storage

Further information:

Attempting to rename certain folders contained within a directory synced to external storage generates the error message:

Could not rename "[folder name]"

The output of your Nextcloud log in Admin > Logging:

Fatal webdav Error – OCP\Lock\LockedException: "[folder name]" is locked

Resolution:
Although running the occ command occ files:scan [username] per Emi, did not resolve the issue; however, following some of the advice provided by the first post of the topic, File is locked - how to unlock, by @tflidd allowed me to rename the folders in question, two separate times:

  1. place Nextcloud in maintenance mode, per the Admin manual
  2. backup the database, or at least export the table oc_files_locks, before emptying all entries under this table
  3. disable maintenance mode
  4. confirm that background jobs could be run regularly

This operation generates a chain of errors, listed in chronological order, in Admin > Logging:

[160+ PHP Errors] – Trying to access array offset on value of type null at /home/ssh-user/domain.tld/nextcloud/3rdparty/leafo/scssphp/src/Compiler.php#5230
[16 PHP Errors] – Trying to access array offset on value of type null at /home/ssh-user/domain.tld/nextcloud/3rdparty/aws/aws-sdk-php/src/RetryMiddleware.php#144
PHP Error – fopen(https://datacenter.hostname.io/bucket-name/newfoldername): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found at /home/ssh-user/domain.tld/nextcloud/lib/private/Files/ObjectStore/S3ObjectTrait.php#74
PHP Error – fopen(httpseek://): failed to open stream: "OC\Files\Stream\SeekableHttpStream::stream_open" call failed at /home/ssh-user/domain.tld/nextcloud/lib/private/Files/Stream/SeekableHttpStream.php#65
PHP Error – fread() expects parameter 1 to be resource, bool given at /home/ssh-user/domain.tld/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#861
PHP Error – fclose() expects parameter 1 to be resource, bool given at /home/ssh-user/domain.tld/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#862

Replicated the steps — The procedure did not appear to affect the contents of the renamed folder, although it repopulates some of the entries within the table oc_files_locks; it is followed by a few more of these errors within the time frame of the login session and a handful more of the same errors upon login and file browsing as the user who changed the folder name:

[PHP Errors] – Trying to access array offset on value of type null at /home/ssh-user/domain.tld/nextcloud/3rdparty/aws/aws-sdk-php/src/RetryMiddleware.php#144

To @Ntouchable and anyone who knows a more reasonable approach to resolving the issue, please contribute to the knowledge of the community with a response.