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 (
    8682, 5974, 8161, 8149, 8246, 8200, 8216, 
    8217, 8305, 6523, 8204, 8260, 8302, 
    8366, 6675, 8301, 8303, 8304, 5419, 
    8324, 5423, 8215, 8307, 8323
  ) 
  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.00093

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 (8682,5974,8161,8149,8246,8200,8216,8217,8305,6523,8204,8260,8302,8366,6675,8301,8303,8304,5419,8324,5423,8215,8307,8323))",
        "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
5419 63000.00000000
5423 197500.00000000
5974 103000.00000000
6523 70000.00000000
6675 50750.00000000
8149 57250.00000000
8161 29000.00000000
8200 131250.00000000
8204 92000.00000000
8215 119000.00000000
8216 119000.00000000
8217 94000.00000000
8246 84750.00000000
8260 54000.00000000
8301 66000.00000000
8302 66000.00000000
8303 35000.00000000
8304 35000.00000000
8305 10000.00000000
8307 40750.00000000
8323 130500.00000000
8324 219000.00000000
8366 26500.00000000
8682 30250.00000000