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 (
    8159, 8166, 8173, 8174, 8183, 8188, 8195, 
    8196, 8199, 8211, 8221, 8231, 8242, 
    8244, 8252, 8277, 8280, 8284, 8288, 
    8292, 8295, 8296, 8300, 8321
  ) 
  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.00116

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 (8159,8166,8173,8174,8183,8188,8195,8196,8199,8211,8221,8231,8242,8244,8252,8277,8280,8284,8288,8292,8295,8296,8300,8321))",
        "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
8159 199000.00000000
8166 32000.00000000
8173 103250.00000000
8174 71000.00000000
8183 169750.00000000
8188 60750.00000000
8195 145000.00000000
8196 75000.00000000
8199 110250.00000000
8211 50000.00000000
8221 150000.00000000
8231 159000.00000000
8242 32000.00000000
8244 29000.00000000
8252 131250.00000000
8277 29000.00000000
8280 39000.00000000
8284 81000.00000000
8288 240000.00000000
8292 165000.00000000
8295 190000.00000000
8296 190000.00000000
8300 190000.00000000
8321 17500.00000000