update lastRead to last_read and make query more moodle-y