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 (
    12654, 12655, 12656, 12657, 12658, 12659, 
    12660, 12661, 12662, 12663, 12664, 
    12665, 12666, 12667, 12668, 12669, 
    12670, 12671, 12672, 12673, 12674, 
    12675, 12676, 12677, 12678, 12679, 
    12680, 12681, 12682, 12683
  ) 
  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.00098

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "42.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": "usergroup",
        "used_key_parts": [
          "product_id",
          "usergroup_id",
          "lower_limit"
        ],
        "key_length": "9",
        "rows_examined_per_scan": 60,
        "rows_produced_per_join": 60,
        "filtered": "100.00",
        "index_condition": "((`test2_gaseus`.`cscart_product_prices`.`lower_limit` = 1) and (`test2_gaseus`.`cscart_product_prices`.`product_id` in (12654,12655,12656,12657,12658,12659,12660,12661,12662,12663,12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679,12680,12681,12682,12683)) and (`test2_gaseus`.`cscart_product_prices`.`usergroup_id` in (0,1)))",
        "cost_info": {
          "read_cost": "36.01",
          "eval_cost": "6.00",
          "prefix_cost": "42.01",
          "data_read_per_join": "1K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ]
      }
    }
  }
}

Result

product_id price
12654 1874.60000000
12655 1874.60000000
12656 1874.60000000
12657 1874.60000000
12658 1874.60000000
12659 1874.60000000
12660 1874.60000000
12661 1874.60000000
12662 1874.60000000
12663 1874.60000000
12664 2648.70000000
12665 2648.70000000
12666 2648.70000000
12667 2648.70000000
12668 2648.70000000
12669 2648.70000000
12670 2648.70000000
12671 2648.70000000
12672 2648.70000000
12673 2648.70000000
12674 2648.70000000
12675 2648.70000000
12676 2648.70000000
12677 2648.70000000
12678 2648.70000000
12679 2648.70000000
12680 2648.70000000
12681 2648.70000000
12682 2648.70000000
12683 2648.70000000