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 (
    5833, 5835, 27363, 3885, 5836, 37305, 
    2566, 38146, 38145, 31652, 6529, 3601, 
    3617, 31651, 31786, 534, 46716, 286, 
    25180, 26846, 1041, 2567, 1835, 46749, 
    729, 227, 33697, 1532, 1838, 1056, 5730, 
    47904
  ) 
  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.00627

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 (5833,5835,27363,3885,5836,37305,2566,38146,38145,31652,6529,3601,3617,31651,31786,534,46716,286,25180,26846,1041,2567,1835,46749,729,227,33697,1532,1838,1056,5730,47904)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
227 300000.0000
286 360000.0000
534 210000.0000
729 440000.0000
1041 450000.0000
1056 449000.0000
1532 225000.0000
1835 220000.0000
1838 380000.0000
2566 400000.0000
2567 400000.0000
3601 340000.0000
3617 250000.0000
3885 330000.0000
5730 380000.0000
5833 211680.0000
5835 254880.0000
5836 216000.0000
6529 280000.0000
25180 270000.0000
26846 260000.0000
27363 380000.0000
31651 450000.0000
31652 300000.0000
31786 490000.0000
33697 250000.0000
37305 248000.0000
38145 420000.0000
38146 270000.0000
46716 320000.0000
46749 480000.0000
47904 389000.0000