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 (
    5362, 5489, 5573, 5793, 8718, 8719, 5428, 
    5524, 5540, 5591, 8715, 10197, 5226, 
    5300, 5466, 5511, 5867, 6590, 5495, 
    5907, 5570, 5771, 5260, 5642
  ) 
  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.00124

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "18.16"
    },
    "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": 27,
        "rows_produced_per_join": 5,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (5362,5489,5573,5793,8718,8719,5428,5524,5540,5591,8715,10197,5226,5300,5466,5511,5867,6590,5495,5907,5570,5771,5260,5642))",
        "cost_info": {
          "read_cost": "17.62",
          "eval_cost": "0.54",
          "prefix_cost": "18.16",
          "data_read_per_join": "129"
        },
        "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
5226 18000.00000000
5260 38000.00000000
5300 17000.00000000
5362 30000.00000000
5428 775000.00000000
5466 415000.00000000
5489 31500.00000000
5495 84000.00000000
5511 192000.00000000
5524 130000.00000000
5540 35000.00000000
5570 20000.00000000
5573 20000.00000000
5591 94500.00000000
5642 20000.00000000
5771 789750.00000000
5793 724000.00000000
5867 1782000.00000000
5907 1053000.00000000
6590 2700000.00000000
8715 665000.00000000
8718 849000.00000000
8719 1049000.00000000
10197 25000.00000000