[SELECT * FROM `pt_vouchers` WHERE ( (valid_from < '1624339051' AND valid_to = '0') OR (valid_from <= '1624339051' AND valid_to > '1624339051') ) ORDER BY merchant][]