UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6I596iYsXOm1HqUJDegcbCcinuLJeQ/ML+bUd0twjpY='
WHERE
key_id = 'b1e372bc214d2640faa7e84ed0b5df512adc70d15d6192eeeb6594f090328e9c'
AND (
token = '6I596iYsXOm1HqUJDegcbCcinuLJeQ/ML+bUd0twjpY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)