If you select "Library Maintenance > Library Metadata Backup Status > Queue All Books" to backup all metadata to an .opf file, exit from Calibre, and then run calibredb as shown below, all of your .opf files will be refreshed en masse very quickly. The log file produced will show you the details of the refreshing operation so you can verify it is working properly.
Code:
calibredb backup_metadata --library-path="S:\Calibre\MyLibraryName"
For all valid parameters, use: calibredb --help
DaltonST