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 (
    21213, 21214, 21215, 21216, 21217, 21218, 
    21219, 21220, 21221, 21222, 21223, 
    21224, 21225, 21226, 21227, 21228
  ) 
  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.00047

JSON explain

{
  "query_block": {
    "select_id": 1,
    "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": 16,
      "filtered": 99.99243927,
      "index_condition": "cscart_product_prices.product_id in (21213,21214,21215,21216,21217,21218,21219,21220,21221,21222,21223,21224,21225,21226,21227,21228)",
      "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
    }
  }
}

Result

product_id price
21213 20900.00000000
21214 165500.00000000
21215 165500.00000000
21216 64800.00000000
21217 30100.00000000
21218 30100.00000000
21219 63500.00000000
21220 27600.00000000
21221 27600.00000000
21222 82300.00000000
21223 82300.00000000
21224 0.00000000
21225 970800.00000000
21226 5900.00000000
21227 0.00000000
21228 0.00000000