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 (
    21063, 1056, 1711, 40811, 5772, 14982, 
    4939, 1748, 5758, 40802, 5757, 43827, 
    47564, 49287, 49289, 48472, 48475
  ) 
  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.00398

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": 17,
          "filtered": 99.9960556,
          "index_condition": "cscart_product_prices.product_id in (21063,1056,1711,40811,5772,14982,4939,1748,5758,40802,5757,43827,47564,49287,49289,48472,48475)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
1056 449000.0000
1711 210800.0000
1748 299000.0000
4939 219000.0000
5757 425000.0000
5758 220000.0000
5772 431200.0000
14982 359000.0000
21063 330000.0000
40802 390000.0000
40811 269000.0000
43827 230000.0000
47564 470000.0000
48472 250000.0000
48475 250000.0000
49287 365000.0000
49289 380000.0000