UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Jyhx/WWse7/nlo/Ljkyjx/48sLYour9c/PdLKurkWPI='
WHERE
key_id = 'a1f50f1275f67a1d8b29a29d7fb4bc0d87d3b46939a282e16bb003ec0b97ed6d'
AND (
token = 'Jyhx/WWse7/nlo/Ljkyjx/48sLYour9c/PdLKurkWPI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)