I understand a little bit more. No certificates were saved. For the moment I will ignore those students who did not pass the quiz and mistakenly downloaded a certificate. The problem you presented was recreating a certificate for students who had passed the quiz, but where no certificates were saved by Moodle.
Here are two workarounds:
I suggested before that you create a new certificate with the correct condition for the quiz and ask students who passed the quiz to check the new certificate. This would be the easiest solution using Moodle but perhaps not for the students. Alternatively, someone could log in for those qualifying students and generate a certificate which would be saved.
If I absolutely had to have a duplicate of a certificate that was downloaded (date issued, unique code) but not saved, then I would need to extract data via a query on the Moodle mySQL database. That might get complicated, so consider if you have enough information in an "export grades" file to use in a certificate. Once I had the data in something like a CSV file, I would use Word and mailmerge to create a series of duplicate certificates. I would put the certificate image as a background, place my fixed text and mailmerge fields in the appropriate places, and a few steps later have a series of individual certificate pdfs.
Just trying to give you a few more idea.