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 (
    18201, 40824, 41441, 6099, 49306, 1897, 
    401, 27360, 6058, 41442, 6061, 40761, 
    2471, 6063, 5890, 6062, 41170, 1429, 
    5834, 6057, 47085, 3471, 4280, 27362, 
    31642, 6556, 36399, 5894, 47660, 6056, 
    6561, 4894
  ) 
  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.00298

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "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": 32,
          "filtered": 99.9960556,
          "index_condition": "cscart_product_prices.product_id in (18201,40824,41441,6099,49306,1897,401,27360,6058,41442,6061,40761,2471,6063,5890,6062,41170,1429,5834,6057,47085,3471,4280,27362,31642,6556,36399,5894,47660,6056,6561,4894)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
401 38556.0000
1429 280000.0000
1897 80000.0000
2471 214500.0000
3471 999000.0000
4280 70000.0000
4894 435000.0000
5834 211680.0000
5890 93000.0000
5894 97000.0000
6056 75000.0000
6057 80000.0000
6058 80000.0000
6061 75000.0000
6062 75000.0000
6063 80000.0000
6099 50000.0000
6556 1389000.0000
6561 290000.0000
18201 183600.0000
27360 430000.0000
27362 420000.0000
31642 119000.0000
36399 360000.0000
40761 775000.0000
40824 375000.0000
41170 225000.0000
41441 6399000.0000
41442 6399000.0000
47085 2080000.0000
47660 880000.0000
49306 480000.0000