UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UsLGX2NqgdHqr5V9jIJsZ2gg8TviV6w8zJZZR/FIPDM='
WHERE
key_id = 'f1c510d2e6d618d9ebb772babbb64701deae22122ec046712b56abf34bda1141'
AND (
token = 'UsLGX2NqgdHqr5V9jIJsZ2gg8TviV6w8zJZZR/FIPDM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)