Please follow these steps:
From your Classroom page, click on the classroom for which you would like to update the code.
Click on the Students tab
Click on the 'Add Students' button (at the top of the page)
Click on the Select button under 'Class Code'
Click on the green arrows to regenerate a class code:
Make sure to provide your students with the new class code!