UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7DXTXLwgp6Re8Hbfx90D6V8WHWv7tfYKpJHgO7qSydc='
WHERE
key_id = 'faab8ce84782dcd7c92624976b6b493653d58058755e3a0e415de87143d82c81'
AND (
token = '7DXTXLwgp6Re8Hbfx90D6V8WHWv7tfYKpJHgO7qSydc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)