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 (
    21037, 21038, 21039, 21040, 21041, 21042, 
    21043, 21044, 21045, 21046, 21047, 
    21048, 21049, 21050, 21051, 21052
  ) 
  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.00040

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 (21037,21038,21039,21040,21041,21042,21043,21044,21045,21046,21047,21048,21049,21050,21051,21052)",
      "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
    }
  }
}

Result

product_id price
21037 32600.00000000
21038 32600.00000000
21039 32600.00000000
21040 19600.00000000
21041 19600.00000000
21042 32600.00000000
21043 11700.00000000
21044 1523100.00000000
21045 11700.00000000
21046 1300.00000000
21047 422700.00000000
21048 62700.00000000
21049 62700.00000000
21050 16300.00000000
21051 12500.00000000
21052 15000.00000000