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 (
    1975, 2305, 49192, 2303, 31965, 1972, 
    2304, 5829, 2302, 22143, 1976, 5830, 
    2299, 31960, 3641, 3639, 2295, 2298, 
    5826, 3640, 2297, 2300, 27366, 2306, 
    1973, 3642, 2301, 5827, 5825, 2296
  ) 
  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.15885

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": 7.339012146,
              "attached_condition": "cscart_product_prices.lower_limit <=> 1 and cscart_product_prices.product_id in (1975,2305,49192,2303,31965,1972,2304,5829,2302,22143,1976,5830,2299,31960,3641,3639,2295,2298,5826,3640,2297,2300,27366,2306,1973,3642,2301,5827,5825,2296) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
1972 405000.0000
1973 130000.0000
1975 240000.0000
1976 405000.0000
2295 555000.0000
2296 125000.0000
2297 230000.0000
2298 405000.0000
2299 275000.0000
2300 555000.0000
2301 125000.0000
2302 335000.0000
2303 640000.0000
2304 230000.0000
2305 350000.0000
2306 139000.0000
3639 610000.0000
3640 150000.0000
3641 260000.0000
3642 425000.0000
5825 230000.0000
5826 395000.0000
5827 265000.0000
5829 295000.0000
5830 555000.0000
22143 275000.0000
27366 35000.0000
31960 35000.0000
31965 420000.0000
49192 350000.0000