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 (
    50216, 50194, 40927, 6372, 6358, 6357, 
    31633, 1975, 2305, 49192, 2303, 6354, 
    31965, 26895, 26894, 38797, 26872, 
    47567, 26871, 26876, 26870, 26874, 
    26878, 26885, 26875, 26879, 26884, 
    1972, 44424, 5141, 297, 51
  ) 
  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.00415

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 (50216,50194,40927,6372,6358,6357,31633,1975,2305,49192,2303,6354,31965,26895,26894,38797,26872,47567,26871,26876,26870,26874,26878,26885,26875,26879,26884,1972,44424,5141,297,51)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
51 175000.0000
297 300000.0000
1972 405000.0000
1975 240000.0000
2303 640000.0000
2305 350000.0000
5141 60000.0000
6354 250000.0000
6357 300000.0000
6358 350000.0000
6372 1190000.0000
26870 329000.0000
26871 329000.0000
26872 329000.0000
26874 329000.0000
26875 170000.0000
26876 170000.0000
26878 170000.0000
26879 170000.0000
26884 90000.0000
26885 63000.0000
26894 88000.0000
26895 52000.0000
31633 135000.0000
31965 420000.0000
38797 35000.0000
40927 260000.0000
44424 300000.0000
47567 890000.0000
49192 350000.0000
50194 180000.0000
50216 410000.0000