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 (
    8609, 8628, 8635, 8637, 8638, 8641, 8661, 
    8694, 8738, 8750, 8753, 8771, 8786, 
    8790, 8808, 8818, 8819, 8820, 8833, 
    8837, 8845, 8854, 8858, 8871
  ) 
  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.00160

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "16.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": 24,
        "rows_produced_per_join": 4,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (8609,8628,8635,8637,8638,8641,8661,8694,8738,8750,8753,8771,8786,8790,8808,8818,8819,8820,8833,8837,8845,8854,8858,8871))",
        "cost_info": {
          "read_cost": "16.33",
          "eval_cost": "0.48",
          "prefix_cost": "16.81",
          "data_read_per_join": "115"
        },
        "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
8609 102000.00000000
8628 43500.00000000
8635 144000.00000000
8637 84000.00000000
8638 292500.00000000
8641 150000.00000000
8661 24750.00000000
8694 26500.00000000
8738 167250.00000000
8750 135000.00000000
8753 125000.00000000
8771 156000.00000000
8786 21000.00000000
8790 18000.00000000
8808 29000.00000000
8818 29000.00000000
8819 26000.00000000
8820 25000.00000000
8833 97500.00000000
8837 103750.00000000
8845 38000.00000000
8854 71250.00000000
8858 329000.00000000
8871 529000.00000000