UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uX88aNvTW5JP2OXVdTh0/Xb8nusWJBetkQ3tpR36pUY='
WHERE
key_id = '688b9144f2e5248ee6eec48245e1ca8a28c0f32c6bc289a7777ac4d79ca37c27'
AND (
token = 'uX88aNvTW5JP2OXVdTh0/Xb8nusWJBetkQ3tpR36pUY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)