UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UXIxPKkZp7+AOR+2+QpjFHWHtQWW5zXgvLnKda7SBpQ='
WHERE
key_id = '28d754bb124c8ce8e296884c286b2d72bb02e5024e4665808502ddb95c4d0928'
AND (
token = 'UXIxPKkZp7+AOR+2+QpjFHWHtQWW5zXgvLnKda7SBpQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)