UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RPHowyj3vZ0uwHPg2BiofpmZY4x5Ta3Fvy5d/5m/jlU='
WHERE
key_id = '1ce8da70ab1fc2e6f4ddded5bb950fa2afeba72da4916491e9c1ac46f74052d6'
AND (
token = 'RPHowyj3vZ0uwHPg2BiofpmZY4x5Ta3Fvy5d/5m/jlU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)