Restricting access to a quiz can be done with groups. Name the group Quiz 1 and then anyone in this group would have access to Quiz 1. When John Smith needs to take Quiz 2, he can be moved to the Quiz 2 group. Here's more info on Groups in Moodle: https://docs.moodle.org/401/en/Groups

Create the groups and restrict access to the quizzes for their particular groups. The link above will take you to the documentation for the Groups feature in Moodle, and near the end of the page are the steps to create groups and restrict access within the quiz settings.