If you're finding your queries are becoming quite large with lots of WHERE conditions, there are two things you can do to make your life a little easier.
First is to write your queries on multiple lines and use indentation if needed. A general rule of thumb that I learned is to begin each line with a MySQL keyword. For example, your second query:
$query = "SELECT *
FROM products
WHERE
(title LIKE '%$search_1%'
OR title LIKE '%$search_2%' )
AND expired = '0' ";
This doesn't reduce the amount you write, but it helps substantially in reading and debugging your queries.
The other way is if you're noticing you're testing the same column to for multiple conditions, instead of writing out each [column] = [condition], try using the IN keyword. For example, the following query:
SELECT *
FROM users
WHERE user_id = 5
OR user_id = 6
OR user_id = 10
OR user_id = 99
Can be written like:
SELECT *
FROM users
WHERE user_id IN (5,6,10,99)
It should work with strings (not 100% sure, but don't see why not) but I find it works best with integers. On the flip side, if you're trying to exclude something, you can use NOT IN.
Hope this helps.