SELECT 
  cscart_product_prices.product_id, 
  MIN(
    IF(
      cscart_product_prices.percentage_discount = 0, 
      cscart_product_prices.price, 
      cscart_product_prices.price - (
        cscart_product_prices.price * cscart_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  cscart_product_prices 
WHERE 
  cscart_product_prices.product_id IN (
    21967, 21968, 21969, 21970, 21971, 21972, 
    21973, 21974, 21975, 21976, 21977, 
    21978, 21979, 21980, 21981, 21982
  ) 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  cscart_product_prices.product_id

Query time 0.00036

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_product_prices",
      "access_type": "range",
      "possible_keys": ["usergroup", "product_id", "lower_limit", "usergroup_id"],
      "key": "product_id",
      "key_length": "3",
      "used_key_parts": ["product_id"],
      "rows": 16,
      "filtered": 99.99243927,
      "index_condition": "cscart_product_prices.product_id in (21967,21968,21969,21970,21971,21972,21973,21974,21975,21976,21977,21978,21979,21980,21981,21982)",
      "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
    }
  }
}

Result

product_id price
21967 278100.00000000
21968 187300.00000000
21969 6700.00000000
21970 42600.00000000
21971 43500.00000000
21972 600.00000000
21973 951700.00000000
21974 21300.00000000
21975 264000.00000000
21976 104500.00000000
21977 66900.00000000
21978 510400.00000000
21979 155500.00000000
21980 0.00000000
21981 513600.00000000
21982 0.00000000