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 (
    4287, 41366, 35690, 42187, 794, 35475, 
    42170, 48851, 41381, 42182, 36522, 
    37292, 6481, 5599, 42185, 24715, 5592, 
    44940, 42168, 42186, 27078, 27076, 
    985, 45601, 37281, 41402, 42163, 5596, 
    42162, 42181, 44599, 41377
  ) 
  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.06786

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "cscart_product_prices.product_id",
      "temporary_table": {
        "nested_loop": [
          {
            "table": {
              "table_name": "cscart_product_prices",
              "access_type": "ref",
              "possible_keys": [
                "usergroup",
                "product_id",
                "lower_limit",
                "usergroup_id"
              ],
              "key": "lower_limit",
              "key_length": "3",
              "used_key_parts": ["lower_limit"],
              "ref": ["const"],
              "rows": 25327,
              "filtered": 8.333330154,
              "attached_condition": "cscart_product_prices.lower_limit <=> 1 and cscart_product_prices.product_id in (4287,41366,35690,42187,794,35475,42170,48851,41381,42182,36522,37292,6481,5599,42185,24715,5592,44940,42168,42186,27078,27076,985,45601,37281,41402,42163,5596,42162,42181,44599,41377) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
794 640000.0000
985 690000.0000
4287 200000.0000
5592 245000.0000
5596 240000.0000
5599 240000.0000
6481 140000.0000
24715 160000.0000
27076 1400000.0000
27078 850000.0000
35475 2500000.0000
35690 480000.0000
36522 50000.0000
37281 207000.0000
37292 248000.0000
41366 275000.0000
41377 110000.0000
41381 165000.0000
41402 420000.0000
42162 150000.0000
42163 180000.0000
42168 80000.0000
42170 150000.0000
42181 80000.0000
42182 70000.0000
42185 80000.0000
42186 120000.0000
42187 150000.0000
44599 300000.0000
44940 117000.0000
45601 420000.0000
48851 640000.0000