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 (
    6245, 6456, 6493, 5313, 5399, 5447, 5529, 
    7692, 8494, 8506, 5349, 5352, 5905, 
    6624, 5358, 6795, 10404, 5201, 5307, 
    5348, 5439, 6444, 7645, 7687
  ) 
  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.00125

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 (6245,6456,6493,5313,5399,5447,5529,7692,8494,8506,5349,5352,5905,6624,5358,6795,10404,5201,5307,5348,5439,6444,7645,7687))",
        "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
5201 35000.00000000
5307 17000.00000000
5313 17000.00000000
5348 17000.00000000
5349 20000.00000000
5352 20000.00000000
5358 20000.00000000
5399 25000.00000000
5439 100000.00000000
5447 155000.00000000
5529 152250.00000000
5905 1296000.00000000
6245 380000.00000000
6444 1770000.00000000
6456 975000.00000000
6493 1269000.00000000
6624 236000.00000000
6795 229000.00000000
7645 200000.00000000
7687 183000.00000000
7692 618000.00000000
8494 1899000.00000000
8506 980000.00000000
10404 159000.00000000