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 (
    951, 41016, 16528, 41384, 4294, 987, 
    3722, 42180, 41409, 4290, 42161, 35691, 
    4284, 41414, 41413, 42184, 4296, 956, 
    988, 41408, 32683, 793, 4293, 4291, 
    41015, 5595, 42188, 41020, 41415, 4281, 
    41412, 41401
  ) 
  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.14414

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 (951,41016,16528,41384,4294,987,3722,42180,41409,4290,42161,35691,4284,41414,41413,42184,4296,956,988,41408,32683,793,4293,4291,41015,5595,42188,41020,41415,4281,41412,41401) and cscart_product_prices.usergroup_id in (0,1)"
            }
          }
        ]
      }
    }
  }
}

Result

product_id price
793 920000.0000
951 1470000.0000
956 730000.0000
987 640000.0000
988 690000.0000
3722 290000.0000
4281 200000.0000
4284 250000.0000
4290 200000.0000
4291 200000.0000
4293 200000.0000
4294 250000.0000
4296 250000.0000
5595 190000.0000
16528 210000.0000
32683 35000.0000
35691 960000.0000
41015 850000.0000
41016 460000.0000
41020 400000.0000
41384 165000.0000
41401 380000.0000
41408 580000.0000
41409 650000.0000
41412 640000.0000
41413 580000.0000
41414 690000.0000
41415 650000.0000
42161 110000.0000
42180 50000.0000
42184 90000.0000
42188 100000.0000