UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JhFXAieRWvCnUO3FSaCjqi+hhLkqcv7yatdgQqG7NeM='
WHERE
key_id = 'ecde8534a60adb7ece049e0224ca83edf791faed3bcdfcd03ef7f1f60081c2b1'
AND (
token = 'JhFXAieRWvCnUO3FSaCjqi+hhLkqcv7yatdgQqG7NeM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)