UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ftkacf+goeBQS+HnpkI+TJUHg2RBxd48DZ9CVryzmoI='
WHERE
key_id = '6aff6d5150cfd9b4ff94a0afbbe8b5e6082a43543a5370e357177937217ec7ac'
AND (
token = 'Ftkacf+goeBQS+HnpkI+TJUHg2RBxd48DZ9CVryzmoI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)