Don't forget the () around the conditions, otherwise you rely on operator's priority
which can be tricky on more complex conditions.
Is it "WHERE A and B or C" read as " A and (B or C) " or read as "(A and 😎 or C" ?
which of course is not the same condition.
To avoid any ambiguity you can use :
SELECT * FROM messages WHERE (username = '$username') AND ( ('status = 'read') OR (status = 'unread') )