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 (
    8007, 7724, 7897, 7952, 7959, 7972, 7974, 
    8009, 8010, 7948, 7949, 7953, 7962, 
    7964, 7968, 8005, 8013, 7231, 7249, 
    7391, 7947, 7955, 7957, 7958, 7975, 
    7992, 7024, 7355, 7893, 7954, 7970, 
    7977, 7196, 7350, 8080, 7227, 7324, 
    7500, 7956, 8006, 7022, 7080, 7191, 
    7250, 7320, 7340, 7352, 7888, 8110, 
    8192, 8364, 7021, 7192, 7256, 7506, 
    7850, 7230, 7319, 7343, 7386, 7900, 
    8214, 7189, 7226, 7348, 7356, 7390, 
    7965, 7232, 7237, 7344, 7383, 7389, 
    7887, 7894, 8207, 9909, 7193, 7262, 
    8069
  ) 
  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.00227

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "56.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": 80,
        "rows_produced_per_join": 15,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (8007,7724,7897,7952,7959,7972,7974,8009,8010,7948,7949,7953,7962,7964,7968,8005,8013,7231,7249,7391,7947,7955,7957,7958,7975,7992,7024,7355,7893,7954,7970,7977,7196,7350,8080,7227,7324,7500,7956,8006,7022,7080,7191,7250,7320,7340,7352,7888,8110,8192,8364,7021,7192,7256,7506,7850,7230,7319,7343,7386,7900,8214,7189,7226,7348,7356,7390,7965,7232,7237,7344,7383,7389,7887,7894,8207,9909,7193,7262,8069))",
        "cost_info": {
          "read_cost": "54.41",
          "eval_cost": "1.60",
          "prefix_cost": "56.01",
          "data_read_per_join": "383"
        },
        "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
7021 65250.00000000
7022 100000.00000000
7024 40000.00000000
7080 17500.00000000
7189 40000.00000000
7191 200000.00000000
7192 215000.00000000
7193 180000.00000000
7196 88500.00000000
7226 88500.00000000
7227 139000.00000000
7230 102000.00000000
7231 127500.00000000
7232 35000.00000000
7237 35000.00000000
7249 30000.00000000
7250 30000.00000000
7256 123500.00000000
7262 100750.00000000
7319 75750.00000000
7320 148500.00000000
7324 156500.00000000
7340 50500.00000000
7343 50500.00000000
7344 80250.00000000
7348 88750.00000000
7350 172750.00000000
7352 359000.00000000
7355 172750.00000000
7356 172750.00000000
7383 359000.00000000
7386 172750.00000000
7389 359000.00000000
7390 122500.00000000
7391 101250.00000000
7500 269000.00000000
7506 330000.00000000
7724 175000.00000000
7850 75000.00000000
7887 286000.00000000
7888 175750.00000000
7893 104000.00000000
7894 198500.00000000
7897 175750.00000000
7900 175750.00000000
7947 25000.00000000
7948 25000.00000000
7949 25000.00000000
7952 18000.00000000
7953 23000.00000000
7954 25000.00000000
7955 25000.00000000
7956 18000.00000000
7957 18000.00000000
7958 18000.00000000
7959 23000.00000000
7962 23000.00000000
7964 375000.00000000
7965 525000.00000000
7968 325500.00000000
7970 329000.00000000
7972 449500.00000000
7974 237000.00000000
7975 314250.00000000
7977 201750.00000000
7992 115000.00000000
8005 255000.00000000
8006 363250.00000000
8007 248000.00000000
8009 219250.00000000
8010 224000.00000000
8013 239000.00000000
8069 170000.00000000
8080 205000.00000000
8110 269000.00000000
8192 160000.00000000
8207 50000.00000000
8214 207000.00000000
8364 95000.00000000
9909 123000.00000000