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 (
    35839, 35731, 631, 4367, 5455, 5581, 
    5577, 35869, 5461, 5958, 5476, 33631, 
    5959, 5472, 5457, 5462, 5960, 5957, 
    5961, 16802, 35733, 5448, 4363, 5956, 
    5451, 5963, 5447, 4365, 5469, 4468, 
    5464, 5474
  ) 
  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.00529

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 (35839,35731,631,4367,5455,5581,5577,35869,5461,5958,5476,33631,5959,5472,5457,5462,5960,5957,5961,16802,35733,5448,4363,5956,5451,5963,5447,4365,5469,4468,5464,5474)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
631 1050000.0000
4363 1480000.0000
4365 1630000.0000
4367 2430000.0000
4468 4150000.0000
5447 3690000.0000
5448 4450000.0000
5451 4650000.0000
5455 3200000.0000
5457 3350000.0000
5461 2200000.0000
5462 1390000.0000
5464 1450000.0000
5469 1390000.0000
5472 1390000.0000
5474 1280000.0000
5476 1280000.0000
5577 1080000.0000
5581 1080000.0000
5956 1200000.0000
5957 1200000.0000
5958 1350000.0000
5959 1350000.0000
5960 3900000.0000
5961 3900000.0000
5963 3500000.0000
16802 1550000.0000
33631 1800000.0000
35731 2000000.0000
35733 1500000.0000
35839 1120000.0000
35869 1600000.0000