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 (
    8509, 8507, 8508, 6447, 6373, 6440, 8714, 
    8713, 8720, 8718, 8719, 8715, 6590, 
    6379, 8722, 6336, 8494, 8506, 6444, 
    8721
  ) 
  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.00087

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "14.01"
    },
    "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": 20,
        "rows_produced_per_join": 3,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (8509,8507,8508,6447,6373,6440,8714,8713,8720,8718,8719,8715,6590,6379,8722,6336,8494,8506,6444,8721))",
        "cost_info": {
          "read_cost": "13.61",
          "eval_cost": "0.40",
          "prefix_cost": "14.01",
          "data_read_per_join": "95"
        },
        "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
6336 770000.00000000
6373 659000.00000000
6379 810000.00000000
6440 1890000.00000000
6444 1770000.00000000
6447 895000.00000000
6590 2700000.00000000
8494 1899000.00000000
8506 980000.00000000
8507 1770000.00000000
8508 890000.00000000
8509 1220000.00000000
8713 439000.00000000
8714 565000.00000000
8715 665000.00000000
8718 849000.00000000
8719 1049000.00000000
8720 1399000.00000000
8721 960000.00000000
8722 1240000.00000000