UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LBxSlHBVFhvlWLD4ZapbTjsr9jbsp+Sy3fwAFWrCRJA='
WHERE
key_id = 'd49974f6b6dffb3a171404c6bc7b68e2bff44c0cd5b606490ce8544dcbbccb9a'
AND (
token = 'LBxSlHBVFhvlWLD4ZapbTjsr9jbsp+Sy3fwAFWrCRJA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)