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 (
    8322, 8324, 8323, 8325, 8326, 8327, 8328, 
    8329, 8332, 8645, 7546, 7547, 7548, 
    7545, 7665, 7556, 7667, 7661, 7508, 
    7929, 9730, 7925, 7928, 7927, 8065, 
    7926, 7930, 8647, 8635, 8637, 8638, 
    8641, 8636, 8639
  ) 
  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.00139

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "23.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": 34,
        "rows_produced_per_join": 6,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (8322,8324,8323,8325,8326,8327,8328,8329,8332,8645,7546,7547,7548,7545,7665,7556,7667,7661,7508,7929,9730,7925,7928,7927,8065,7926,7930,8647,8635,8637,8638,8641,8636,8639))",
        "cost_info": {
          "read_cost": "23.13",
          "eval_cost": "0.68",
          "prefix_cost": "23.81",
          "data_read_per_join": "163"
        },
        "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
7508 148500.00000000
7545 54000.00000000
7546 105000.00000000
7547 126000.00000000
7548 141000.00000000
7556 148500.00000000
7661 69000.00000000
7665 88500.00000000
7667 181500.00000000
7925 81000.00000000
7926 85750.00000000
7927 81000.00000000
7928 85750.00000000
7929 148500.00000000
7930 58500.00000000
8065 148500.00000000
8322 172500.00000000
8323 130500.00000000
8324 219000.00000000
8325 855000.00000000
8326 597000.00000000
8327 660000.00000000
8328 78000.00000000
8329 67500.00000000
8332 180000.00000000
8635 144000.00000000
8636 61500.00000000
8637 84000.00000000
8638 292500.00000000
8639 568500.00000000
8641 150000.00000000
8645 174000.00000000
8647 63000.00000000
9730 60000.00000000