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 (
    8309, 8205, 8147, 8163, 8236, 7886, 8203, 
    8237, 8261, 8308, 8319, 8682, 8161, 
    8246, 8216, 8217, 8305, 8204, 8260, 
    8302, 8366, 8301, 8303, 8304
  ) 
  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.00109

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "16.81"
    },
    "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": 24,
        "rows_produced_per_join": 4,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (8309,8205,8147,8163,8236,7886,8203,8237,8261,8308,8319,8682,8161,8246,8216,8217,8305,8204,8260,8302,8366,8301,8303,8304))",
        "cost_info": {
          "read_cost": "16.33",
          "eval_cost": "0.48",
          "prefix_cost": "16.81",
          "data_read_per_join": "115"
        },
        "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
7886 36000.00000000
8147 52750.00000000
8161 29000.00000000
8163 25500.00000000
8203 125750.00000000
8204 92000.00000000
8205 79000.00000000
8216 119000.00000000
8217 94000.00000000
8236 34250.00000000
8237 34250.00000000
8246 84750.00000000
8260 54000.00000000
8261 105000.00000000
8301 66000.00000000
8302 66000.00000000
8303 35000.00000000
8304 35000.00000000
8305 10000.00000000
8308 40750.00000000
8309 40750.00000000
8319 41000.00000000
8366 26500.00000000
8682 30250.00000000