I'm having the exact same problem. It appears that the first user can generate a certfiicate and download it. But another user afterwards gets the error about duplicate index. I'm using Simple Certificate 2.2.10 2020041238 on Moodle 3.9.7+ (Build: 20210617) How do I fix this? I've never experienced this with Simple Certificate before.