UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UQ9HUTNNNqIxCdy/HUAfjgrzoWW9YJuxXsJQim/B33A='
WHERE
key_id = '93da68e3b138f29e3072385a6dc186809966ddd43f9ccfd6a8583258830b499d'
AND (
token = 'UQ9HUTNNNqIxCdy/HUAfjgrzoWW9YJuxXsJQim/B33A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)