UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XUF5eTkVxuJgVFhu9c/9RYE1pAy/FVDB8Ksk6g9J/+o='
WHERE
key_id = 'cb8e2b3d709aef28ac89d44ec0ad54815cb735ad4cf0b32e2e5c16573051cf40'
AND (
token = 'XUF5eTkVxuJgVFhu9c/9RYE1pAy/FVDB8Ksk6g9J/+o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)