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 (
    4724, 40141, 36574, 3821, 4719, 3818, 
    40144, 48822, 36573, 36503, 4731, 3820, 
    3819, 1064, 46188, 46272, 46271, 46270, 
    4733, 43265, 36575, 46169, 46190, 47185, 
    46168, 46263, 46171, 46187, 46173, 
    46170, 48817, 46172
  ) 
  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.00925

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_product_prices",
          "access_type": "range",
          "possible_keys": [
            "usergroup",
            "product_id",
            "lower_limit",
            "usergroup_id"
          ],
          "key": "product_id",
          "key_length": "3",
          "used_key_parts": ["product_id"],
          "rows": 32,
          "filtered": 99.9960556,
          "index_condition": "cscart_product_prices.product_id in (4724,40141,36574,3821,4719,3818,40144,48822,36573,36503,4731,3820,3819,1064,46188,46272,46271,46270,4733,43265,36575,46169,46190,47185,46168,46263,46171,46187,46173,46170,48817,46172)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
1064 329000.0000
3818 150000.0000
3819 200000.0000
3820 200000.0000
3821 250000.0000
4719 200000.0000
4724 300000.0000
4731 300000.0000
4733 200000.0000
36503 200000.0000
36573 350000.0000
36574 350000.0000
36575 350000.0000
40141 25000.0000
40144 25000.0000
43265 100000.0000
46168 3200000.0000
46169 3200000.0000
46170 3800000.0000
46171 200000.0000
46172 200000.0000
46173 200000.0000
46187 4666000.0000
46188 4666000.0000
46190 4666000.0000
46263 4666000.0000
46270 4666000.0000
46271 4666000.0000
46272 4666000.0000
47185 45000.0000
48817 950000.0000
48822 1350000.0000