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 (
    594, 597, 596, 618, 642, 641, 616, 661, 
    624, 599, 634, 652, 638, 658, 619, 659, 
    654, 639, 649, 657, 598, 643
  ) 
  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.00055

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "58.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": 26,
        "rows_produced_per_join": 5,
        "filtered": "19.62",
        "index_condition": "(`danishecarter_latest`.`cscart_product_prices`.`product_id` in (594,597,596,618,642,641,616,661,624,599,634,652,638,658,619,659,654,639,649,657,598,643))",
        "cost_info": {
          "read_cost": "57.39",
          "eval_cost": "1.02",
          "prefix_cost": "58.41",
          "data_read_per_join": "163"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`danishecarter_latest`.`cscart_product_prices`.`lower_limit` = 1) and (`danishecarter_latest`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
594 28000.00000000
596 20500.00000000
597 28000.00000000
598 75300.00000000
599 51900.00000000
616 15600.00000000
618 37600.00000000
619 23200.00000000
624 39900.00000000
634 45900.00000000
638 27200.00000000
639 52000.00000000
641 22400.00000000
642 22400.00000000
643 41900.00000000
649 28000.00000000
652 6500.00000000
654 22400.00000000
657 22400.00000000
658 20000.00000000
659 20000.00000000
661 13880.00000000