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 (
    6368, 3519, 15322, 6274, 48559, 30368, 
    48251, 40381, 47828, 46583, 48557, 
    1945, 48244, 22263, 48503, 2859, 35177, 
    44946, 44943, 1977, 3578, 44944, 27356, 
    35167, 35165, 35174, 35176, 35173, 
    35170, 2291, 35172, 35171
  ) 
  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.00818

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 (6368,3519,15322,6274,48559,30368,48251,40381,47828,46583,48557,1945,48244,22263,48503,2859,35177,44946,44943,1977,3578,44944,27356,35167,35165,35174,35176,35173,35170,2291,35172,35171)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
1945 450000.0000
1977 78732.0000
2291 50000.0000
2859 550000.0000
3519 169000.0000
3578 119000.0000
6274 110000.0000
6368 790000.0000
15322 225000.0000
22263 150000.0000
27356 600000.0000
30368 220000.0000
35165 1153000.0000
35167 484000.0000
35170 1417000.0000
35171 572000.0000
35172 1376000.0000
35173 1323000.0000
35174 583000.0000
35176 1240000.0000
35177 665000.0000
40381 240000.0000
44943 680000.0000
44944 650000.0000
44946 700000.0000
46583 230000.0000
47828 295000.0000
48244 690000.0000
48251 690000.0000
48503 920000.0000
48557 495000.0000
48559 616000.0000