I had an issue after updating to 2021 (build 1240) where, upon the first startup when it got updating the media file, an error would occur saying the Database was locked. I canceled the startup and made sure Comicbase was no longer running (via Task Manager) Then I started Sidekick and did an optimization of the database. Once done, I tried launching the main ComicBase again and successfully got past the lock point.
Hope this is helpful to anyone else who encounters this issue