That error indicates windows is preventing calibre from accessing the
files in its library because the files are open in another application.
The mnost common cause of that is using a file syncing tool like DropBox
or an antivirus program. Disable both or exclude the calibre library
folder from their scans.

calibre does not block itself while writing its database. In fact that
error indicates that something had one of the files in the library
opened before starting the database update, since calibre tries to lock
all the files it is changing before starting the change. It's possibel
that something in the find duplicates plugin is causing that, but I do
not provide support for third party plugins, you will need to contact
the plugin's author.