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 (
    4812, 1852, 1472, 2464, 1996, 41360, 
    27287, 2251, 41357, 5645, 41363, 45282, 
    45024, 41388, 4290, 4300, 3642, 40929, 
    1995, 41138, 4001, 47610, 40753, 35691, 
    43651, 41410, 31741, 41427, 41359, 
    2640, 1991, 5963
  ) 
  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.05254

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 (4812,1852,1472,2464,1996,41360,27287,2251,41357,5645,41363,45282,45024,41388,4290,4300,3642,40929,1995,41138,4001,47610,40753,35691,43651,41410,31741,41427,41359,2640,1991,5963) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
1472 380000.0000
1852 800000.0000
1991 160000.0000
1995 160000.0000
1996 180000.0000
2251 15500000.0000
2464 126500.0000
2640 320000.0000
3642 425000.0000
4001 1155000.0000
4290 200000.0000
4300 300000.0000
4812 380000.0000
5645 190000.0000
5963 3500000.0000
27287 150000.0000
31741 225000.0000
35691 960000.0000
40753 590000.0000
40929 390000.0000
41138 499000.0000
41357 303000.0000
41359 275000.0000
41360 303000.0000
41363 275000.0000
41388 207000.0000
41410 1380000.0000
41427 890000.0000
43651 650000.0000
45024 45000.0000
45282 1850000.0000
47610 484000.0000