UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MbJlxamIdQiJoS8+rNGrih49NsPbz6DSvqWuD3iVasM='
WHERE
key_id = '5c1b9e059fed339256a1878c96d6cd1e23a10c31db39dd7eaf32b25da579bb0a'
AND (
token = 'MbJlxamIdQiJoS8+rNGrih49NsPbz6DSvqWuD3iVasM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)