UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8/ZFwyyOeKaamaBPacdi/SJDSx0yh7Rt2WC4sEwtdzQ='
WHERE
key_id = '0aa071ca0a9710af664049f918cff645bc32861493a8768e21e126c983a93957'
AND (
token = '8/ZFwyyOeKaamaBPacdi/SJDSx0yh7Rt2WC4sEwtdzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)