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 (
    5230, 3886, 296, 20932, 40154, 6529, 
    3785, 2130, 41232, 3601, 5205, 2462, 
    24018, 40148, 2512, 2013, 1437, 37847, 
    82, 3382, 32127, 2253, 41443, 1262, 
    2304, 40455, 47524, 27350, 3617, 1053, 
    25445, 2082
  ) 
  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.11933

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 (5230,3886,296,20932,40154,6529,3785,2130,41232,3601,5205,2462,24018,40148,2512,2013,1437,37847,82,3382,32127,2253,41443,1262,2304,40455,47524,27350,3617,1053,25445,2082) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
82 99000.0000
296 215000.0000
1053 3450000.0000
1262 138000.0000
1437 450000.0000
2013 160000.0000
2082 520000.0000
2130 140000.0000
2253 21800000.0000
2304 230000.0000
2462 126500.0000
2512 45000.0000
3382 90000.0000
3601 340000.0000
3617 250000.0000
3785 495000.0000
3886 380000.0000
5205 150000.0000
5230 80000.0000
6529 280000.0000
20932 750000.0000
24018 75000.0000
25445 775000.0000
27350 385000.0000
32127 130000.0000
37847 159000.0000
40148 25000.0000
40154 30000.0000
40455 590000.0000
41232 279000.0000
41443 6399000.0000
47524 250000.0000