UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HpxSoJJ6MdPm5xd6w+85sDcZXoXWbTeKDmbfPgoB17U=' 
WHERE 
  key_id = '606b7e402e6950e4bfc8e8c23467ca3ceb40e8cb886864a86ae785ee3cb628e6' 
  AND (
    token = 'HpxSoJJ6MdPm5xd6w+85sDcZXoXWbTeKDmbfPgoB17U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034