UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nv3NygRPDZGkd3bP5DC/uw83/SP+xkSp83ReVtFF7n4='
WHERE
key_id = 'dfe676521aeccd8d4f4becba0b4381ed92bb0bf6bb85202193ad4b3a0a69c874'
AND (
token = 'nv3NygRPDZGkd3bP5DC/uw83/SP+xkSp83ReVtFF7n4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)