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 (
    339487, 339682, 339613, 339639, 339555, 
    339480, 339560, 271697, 339579, 339854, 
    339680, 339559, 339788, 339850, 339772, 
    339475, 339815, 339785, 339561, 339566, 
    339766, 339558, 339568, 339688, 339661, 
    339563, 339819, 339837, 339640, 339585, 
    339790, 339598, 339634, 381694, 339578, 
    339546, 339629, 392159, 339672, 381692, 
    339844, 339641, 339624, 339832, 339627, 
    339840, 381689, 339687, 381685, 220162, 
    339842, 339612, 339800, 339642, 339827, 
    265036, 339764, 339605, 339564, 220170, 
    431190, 339690, 339462, 381682, 430574, 
    339562, 339663, 339793, 339554, 339700, 
    271696, 392172, 271695, 431092, 339792, 
    381688, 431106, 435505, 339811, 381693, 
    381691, 220169, 431147, 339801, 339459, 
    339590, 339473, 339592, 430849, 220166, 
    339799, 339679, 381690, 339791, 339795, 
    339660, 339623, 339803, 339813, 339659
  ) 
  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.00157

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "280.31"
    },
    "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": 200,
        "rows_produced_per_join": 200,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "240.31",
          "eval_cost": "40.00",
          "prefix_cost": "280.31",
          "data_read_per_join": "12K"
        },
        "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 (339487,339682,339613,339639,339555,339480,339560,271697,339579,339854,339680,339559,339788,339850,339772,339475,339815,339785,339561,339566,339766,339558,339568,339688,339661,339563,339819,339837,339640,339585,339790,339598,339634,381694,339578,339546,339629,392159,339672,381692,339844,339641,339624,339832,339627,339840,381689,339687,381685,220162,339842,339612,339800,339642,339827,265036,339764,339605,339564,220170,431190,339690,339462,381682,430574,339562,339663,339793,339554,339700,271696,392172,271695,431092,339792,381688,431106,435505,339811,381693,381691,220169,431147,339801,339459,339590,339473,339592,430849,220166,339799,339679,381690,339791,339795,339660,339623,339803,339813,339659)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
220162 0.00000000
220166 0.00000000
220169 0.00000000
220170 0.00000000
265036 0.00000000
271695 0.00000000
271696 0.00000000
271697 0.00000000
339459 110.00000000
339462 85.00000000
339473 9.00000000
339475 12.00000000
339480 45.00000000
339487 65.00000000
339546 10.00000000
339554 8.00000000
339555 7.00000000
339558 12.00000000
339559 7.00000000
339560 11.00000000
339561 85.00000000
339562 8.00000000
339563 35.00000000
339564 7.00000000
339566 17.00000000
339568 26.00000000
339578 45.00000000
339579 40.00000000
339585 45.00000000
339590 8.00000000
339592 12.00000000
339598 10.00000000
339605 5.50000000
339612 20.00000000
339613 17.00000000
339623 4.00000000
339624 7.00000000
339627 26.00000000
339629 26.00000000
339634 38.00000000
339639 9.50000000
339640 7.50000000
339641 23.00000000
339642 18.00000000
339659 12.00000000
339660 6.00000000
339661 30.00000000
339663 18.00000000
339672 12.50000000
339679 8.00000000
339680 4.50000000
339682 5.00000000
339687 12.00000000
339688 78.00000000
339690 10.00000000
339700 110.00000000
339764 65.00000000
339766 170.00000000
339772 5.40000000
339785 37.00000000
339788 39.00000000
339790 40.00000000
339791 65.00000000
339792 65.00000000
339793 68.00000000
339795 70.00000000
339799 80.00000000
339800 80.00000000
339801 40.00000000
339803 40.00000000
339811 75.00000000
339813 97.00000000
339815 32.00000000
339819 144.00000000
339827 30.00000000
339832 98.00000000
339837 20.00000000
339840 21.00000000
339842 43.00000000
339844 25.00000000
339850 42.00000000
339854 15.00000000
381682 0.00000000
381685 0.00000000
381688 0.00000000
381689 0.00000000
381690 0.00000000
381691 0.00000000
381692 0.00000000
381693 0.00000000
381694 0.00000000
392159 399.00000000
392172 89.00000000
430574 102.00000000
430849 29.90000000
431092 31.50000000
431106 31.50000000
431147 29.90000000
431190 26.90000000
435505 30.00000000