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 (
    6521, 6508, 6419, 6519, 6420, 6517, 6458, 
    6597, 6565, 6566, 6570, 6599, 6568, 
    6596, 6598, 6595, 6273, 6265, 6329, 
    6357, 6350, 6348, 6322, 6285, 6327, 
    6283, 6284, 6326, 6363, 6351, 6324, 
    6409, 6863, 6325, 6328, 6349, 6353, 
    6410, 6418, 6352
  ) 
  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.00165

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "28.01"
    },
    "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": 40,
        "rows_produced_per_join": 7,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (6521,6508,6419,6519,6420,6517,6458,6597,6565,6566,6570,6599,6568,6596,6598,6595,6273,6265,6329,6357,6350,6348,6322,6285,6327,6283,6284,6326,6363,6351,6324,6409,6863,6325,6328,6349,6353,6410,6418,6352))",
        "cost_info": {
          "read_cost": "27.21",
          "eval_cost": "0.80",
          "prefix_cost": "28.01",
          "data_read_per_join": "191"
        },
        "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
6265 7105000.00000000
6273 5665000.00000000
6283 5220000.00000000
6284 5032000.00000000
6285 4670000.00000000
6322 1144000.00000000
6324 812000.00000000
6325 602000.00000000
6326 629000.00000000
6327 2146000.00000000
6328 1740000.00000000
6329 1255000.00000000
6348 692000.00000000
6349 664000.00000000
6350 647000.00000000
6351 479000.00000000
6352 1279000.00000000
6353 1218000.00000000
6357 1117000.00000000
6363 750000.00000000
6409 682000.00000000
6410 609000.00000000
6418 1168000.00000000
6419 740000.00000000
6420 551000.00000000
6458 435000.00000000
6508 445000.00000000
6517 185000.00000000
6519 163000.00000000
6521 66000.00000000
6565 957000.00000000
6566 914000.00000000
6568 662000.00000000
6570 801000.00000000
6595 566000.00000000
6596 496000.00000000
6597 270000.00000000
6598 334000.00000000
6599 314000.00000000
6863 261000.00000000