My question is somewhat related to this one wp_options table has duplicate rows and primary key / autoincrement has been removed
However, this is not in result of importing database. The website was up for many years and probably a plugin update corrupted wp_options table. Now thousands of entries in wp_options table have lost ID number and are marked as zero thus duplicates and table has lost primary key and auto increasment.
I have tried to export wp_options table and re_import but still no success. I can not delete these records that are duplicate.
Looking for some hints / ideas.