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 (
    3786, 297, 14965, 27363, 33716, 3885, 
    38559, 22431, 306, 20581, 1095, 6050, 
    3171, 3773, 6068, 3776, 33717, 3771, 
    385, 2899, 1832, 37305, 68, 3176, 1097, 
    5408, 775, 48843, 38146, 37319, 41446, 
    41435
  ) 
  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.13066

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 (3786,297,14965,27363,33716,3885,38559,22431,306,20581,1095,6050,3171,3773,6068,3776,33717,3771,385,2899,1832,37305,68,3176,1097,5408,775,48843,38146,37319,41446,41435) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
68 55000.0000
297 300000.0000
306 400000.0000
385 109000.0000
775 820000.0000
1095 210000.0000
1097 50000.0000
1832 160000.0000
2899 335000.0000
3171 320000.0000
3176 99000.0000
3771 415000.0000
3773 275000.0000
3776 385000.0000
3786 435000.0000
3885 330000.0000
5408 295000.0000
6050 180000.0000
6068 100000.0000
14965 550000.0000
20581 175000.0000
22431 49000.0000
27363 380000.0000
33716 2580000.0000
33717 2580000.0000
37305 248000.0000
37319 290000.0000
38146 270000.0000
38559 484000.0000
41435 3749000.0000
41446 1690000.0000
48843 540000.0000