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 (
    339511, 339515, 339527, 339513, 339519, 
    339510, 339518, 339508, 339713, 339525, 
    339505, 339530, 339514, 339521, 339551, 
    339501, 339499, 339721, 339495, 339494, 
    339503, 339531, 339516, 339637, 339539, 
    339509, 339636, 339538, 339492, 339506, 
    339724, 339635, 339502, 339537, 339491, 
    339540, 339524, 339493, 339536, 339520, 
    339517, 339522, 339526, 339490, 339498, 
    339528, 339497, 339507, 339512, 339523, 
    339504, 339500, 339532, 339535, 339534, 
    339496, 339533, 339529
  ) 
  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.00318

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "162.58"
    },
    "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": 116,
        "rows_produced_per_join": 116,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "139.39",
          "eval_cost": "23.20",
          "prefix_cost": "162.59",
          "data_read_per_join": "7K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`webmarco`.`cscart_product_prices`.`lower_limit` = 1) and (`webmarco`.`cscart_product_prices`.`product_id` in (339511,339515,339527,339513,339519,339510,339518,339508,339713,339525,339505,339530,339514,339521,339551,339501,339499,339721,339495,339494,339503,339531,339516,339637,339539,339509,339636,339538,339492,339506,339724,339635,339502,339537,339491,339540,339524,339493,339536,339520,339517,339522,339526,339490,339498,339528,339497,339507,339512,339523,339504,339500,339532,339535,339534,339496,339533,339529)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
339490 70.00000000
339491 70.00000000
339492 85.00000000
339493 140.00000000
339494 100.00000000
339495 65.00000000
339496 55.00000000
339497 140.00000000
339498 175.00000000
339499 115.00000000
339500 110.00000000
339501 85.00000000
339502 240.00000000
339503 75.00000000
339504 85.00000000
339505 115.00000000
339506 55.00000000
339507 60.00000000
339508 150.00000000
339509 60.00000000
339510 115.00000000
339511 85.00000000
339512 180.00000000
339513 190.00000000
339514 200.00000000
339515 230.00000000
339516 295.00000000
339517 170.00000000
339518 70.00000000
339519 85.00000000
339520 90.00000000
339521 120.00000000
339522 95.00000000
339523 110.00000000
339524 145.00000000
339525 260.00000000
339526 130.00000000
339527 145.00000000
339528 70.00000000
339529 65.00000000
339530 65.00000000
339531 65.00000000
339532 65.00000000
339533 220.00000000
339534 270.00000000
339535 325.00000000
339536 59.00000000
339537 70.00000000
339538 55.00000000
339539 70.00000000
339540 95.00000000
339551 110.00000000
339635 140.00000000
339636 235.00000000
339637 195.00000000
339713 260.00000000
339721 170.00000000
339724 115.00000000