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 (
    7817, 7987, 7819, 7815, 7992, 7664, 8826, 
    7814, 7818, 7990, 7985, 7986, 7989, 
    8527, 8823, 7816, 7988, 8524, 8525, 
    8526, 8825, 8827
  ) 
  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.00112

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "15.41"
    },
    "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": 22,
        "rows_produced_per_join": 4,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (7817,7987,7819,7815,7992,7664,8826,7814,7818,7990,7985,7986,7989,8527,8823,7816,7988,8524,8525,8526,8825,8827))",
        "cost_info": {
          "read_cost": "14.97",
          "eval_cost": "0.44",
          "prefix_cost": "15.41",
          "data_read_per_join": "105"
        },
        "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
7664 81750.00000000
7814 81750.00000000
7815 86500.00000000
7816 74000.00000000
7817 75750.00000000
7818 92000.00000000
7819 74000.00000000
7985 139000.00000000
7986 147500.00000000
7987 132000.00000000
7988 116250.00000000
7989 109500.00000000
7990 119250.00000000
7992 115000.00000000
8524 187250.00000000
8525 70750.00000000
8526 96000.00000000
8527 222750.00000000
8823 253750.00000000
8825 340750.00000000
8826 258000.00000000
8827 146250.00000000