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

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 (339766,339763,339613,339560,339830,339472,339682,339823,339543,339558,339785,339480,339561,339854,339815,339639,339566,339819,339563,339772,339585,339837,339680,339661,339640,339788,381694,381692,339840,339555,339634,339672,339629,339598,339578,339832,339641,339790,339688,220162,339627,339842,381689,381685,339475,339568,339546,339844,339827,339642,339612,265036,339605,381682,220170,339687,339564,339562,430574,271695,339663,339624,339462,271696,339800,431190,339690,392159,381688,381691,339792,381693,339554,339764,431106,339793,435505,220169,431092,339592,381690,339459,339590,220166,431147,220178,339473,339795,339799,339803,339679,339791,339813,339660,339801,339786,430849,339678,339659,339465)) 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
220178 0.00000000
265036 0.00000000
271695 0.00000000
271696 0.00000000
339459 110.00000000
339462 85.00000000
339465 90.00000000
339472 10.00000000
339473 9.00000000
339475 12.00000000
339480 45.00000000
339543 9.00000000
339546 10.00000000
339554 8.00000000
339555 7.00000000
339558 12.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
339585 45.00000000
339590 8.00000000
339592 12.00000000
339598 10.00000000
339605 5.50000000
339612 20.00000000
339613 17.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
339678 6.50000000
339679 8.00000000
339680 4.50000000
339682 5.00000000
339687 12.00000000
339688 78.00000000
339690 10.00000000
339763 65.00000000
339764 65.00000000
339766 170.00000000
339772 5.40000000
339785 37.00000000
339786 38.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
339813 97.00000000
339815 32.00000000
339819 144.00000000
339823 26.00000000
339827 30.00000000
339830 112.00000000
339832 98.00000000
339837 20.00000000
339840 21.00000000
339842 43.00000000
339844 25.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
430574 102.00000000
430849 29.90000000
431092 31.50000000
431106 31.50000000
431147 29.90000000
431190 26.90000000
435505 30.00000000