UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b6Ir7fM8xPPcZNvQIWtBeCKoqQlSYD7BdgC9phXZY/0='
WHERE
key_id = '67e2634aef8f46ae13329c5c8598bf12662601c40d79bd34ec2c43eda63ca4df'
AND (
token = 'b6Ir7fM8xPPcZNvQIWtBeCKoqQlSYD7BdgC9phXZY/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)