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 (
    3021, 3373, 2522, 6041, 3562, 2135, 2719, 
    3543, 5266, 2897, 1666, 2884, 3593, 
    5024, 5111, 5262, 5860, 6420, 4038, 
    5282, 6517, 3266, 3385, 4573
  ) 
  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.00108

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 (3021,3373,2522,6041,3562,2135,2719,3543,5266,2897,1666,2884,3593,5024,5111,5262,5860,6420,4038,5282,6517,3266,3385,4573))",
        "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
1666 45000.00000000
2135 285000.00000000
2522 51000.00000000
2719 18000.00000000
2884 730000.00000000
2897 328000.00000000
3021 39000.00000000
3266 510000.00000000
3373 55000.00000000
3385 10000.00000000
3543 4899000.00000000
3562 1999000.00000000
3593 55000.00000000
4038 6000.00000000
4573 96000.00000000
5024 13950.00000000
5111 7000.00000000
5262 8000.00000000
5266 8000.00000000
5282 8000.00000000
5860 1957500.00000000
6041 69000.00000000
6420 551000.00000000
6517 185000.00000000