UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QtRemE++6t7rlqV+iGnz6jDmmB2+Aje5Y5azM/vtcKM='
WHERE
key_id = '2911b56ff0c6373d7d3c2ae9e3c4ed3e43637f4b2602136459e5c675578c8dab'
AND (
token = 'QtRemE++6t7rlqV+iGnz6jDmmB2+Aje5Y5azM/vtcKM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)