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 (
    7251, 7079, 7503, 6860, 7318, 7351, 7899, 
    7247, 9166, 7349, 8044, 7229, 7257, 
    7347, 7967, 7973, 7966, 7978, 8191, 
    9301, 8190, 7081, 7945, 9994
  ) 
  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.00122

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 (7251,7079,7503,6860,7318,7351,7899,7247,9166,7349,8044,7229,7257,7347,7967,7973,7966,7978,8191,9301,8190,7081,7945,9994))",
        "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
6860 83750.00000000
7079 133000.00000000
7081 65000.00000000
7229 118500.00000000
7247 30000.00000000
7251 42750.00000000
7257 114000.00000000
7318 54000.00000000
7347 90500.00000000
7349 107250.00000000
7351 172750.00000000
7503 221000.00000000
7899 175750.00000000
7945 25000.00000000
7966 302250.00000000
7967 324000.00000000
7973 272250.00000000
7978 184000.00000000
8044 200000.00000000
8190 133000.00000000
8191 115000.00000000
9166 16000.00000000
9301 111500.00000000
9994 100000.00000000