This sentence is correct. 'Myself' is the correct reflexive pronoun for the subject 'I'.
Corrected sentence: I told myself not to worry about the exams.