Go to the Administration box on the course page, then click users > enrolment methods.
Click on the cog settings wheel to the right of self enrolment (student). You can now change the enrolment key and scroll down to save the changes.
» A-Z Moodle Help!