update moodle_token if needed