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 (
    2471, 40761, 382, 2136, 2502, 2961, 41421, 
    5890, 5551, 3875, 466, 2132, 38558, 
    3168, 3663, 40452, 509, 2965, 44939, 
    5553, 3230, 1123, 41170, 2286, 112, 
    1429, 3170, 36746, 47085, 6211, 3471, 
    4072
  ) 
  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.07273

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.080804825,
              "attached_condition": "cscart_product_prices.lower_limit <=> 1 and cscart_product_prices.product_id in (2471,40761,382,2136,2502,2961,41421,5890,5551,3875,466,2132,38558,3168,3663,40452,509,2965,44939,5553,3230,1123,41170,2286,112,1429,3170,36746,47085,6211,3471,4072) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
112 145000.0000
382 170000.0000
466 3228000.0000
509 60000.0000
1123 538000.0000
1429 280000.0000
2132 70000.0000
2136 55000.0000
2286 35000.0000
2471 214500.0000
2502 35000.0000
2961 75000.0000
2965 94000.0000
3168 340000.0000
3170 450000.0000
3230 129000.0000
3471 999000.0000
3663 350000.0000
3875 170000.0000
4072 300000.0000
5551 250000.0000
5553 250000.0000
5890 93000.0000
6211 535000.0000
36746 240000.0000
38558 528000.0000
40452 590000.0000
40761 775000.0000
41170 225000.0000
41421 610000.0000
44939 117000.0000
47085 2080000.0000