UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e98tU028+f8fB1Ptg8lShtbuytVhuQP7THUUOIYbegk='
WHERE
key_id = '4594707a0ab45c4890a6e0de12cc268a1e45d07c60e0cedb27e1d841c3f13bfa'
AND (
token = 'e98tU028+f8fB1Ptg8lShtbuytVhuQP7THUUOIYbegk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)