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 (
    3998, 4573, 2117, 2115, 4644, 4041, 4030, 
    2118, 4641, 2116, 4642, 4643, 4053, 
    3994, 4042, 4574, 4065, 4646, 4645
  ) 
  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.00080

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "13.31"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "product_id",
        "used_key_parts": [
          "product_id"
        ],
        "key_length": "3",
        "rows_examined_per_scan": 19,
        "rows_produced_per_join": 3,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (3998,4573,2117,2115,4644,4041,4030,2118,4641,2116,4642,4643,4053,3994,4042,4574,4065,4646,4645))",
        "cost_info": {
          "read_cost": "12.93",
          "eval_cost": "0.38",
          "prefix_cost": "13.31",
          "data_read_per_join": "91"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`lower_limit` = 1) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
2115 566500.00000000
2116 759000.00000000
2117 610500.00000000
2118 792000.00000000
3994 3375000.00000000
3998 3075000.00000000
4030 1190000.00000000
4041 575000.00000000
4042 725000.00000000
4053 615000.00000000
4065 755000.00000000
4573 96000.00000000
4574 106000.00000000
4641 110000.00000000
4642 150000.00000000
4643 145000.00000000
4644 210000.00000000
4645 185000.00000000
4646 195000.00000000