You can use the NOT IN Constraint for that which is available in the MYSQL.
NOT IN() function:
MySQL NOT IN() makes sure that the expression proceeded does not have any of the values present in the arguments
Example: If you want to fetch the rows from the table book_mast which contain such books, not written in English and the price of the books are not 100 or 200, the following statement can be used.
SELECT book_name,dt_of_pub,pub_lang,no_page,book_price
FROM book_mast
WHERE pub_lang!="English"
AND book_price NOT IN (100,200);
Reference: https://www.techonthenet.com/mysql/not.php
As per your code you need to change the query like.
"SELECT * FROM tbl WHERE user_role_id NOT IN (1, 4, 5)"