SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_sum_products_amount 
WHERE 
  1 
  AND product_id IN (
    21, 46, 48, 49, 50, 51, 53, 91, 92, 105, 
    129, 138, 139, 21567, 22712, 22713, 
    22714, 22715, 22716, 50989, 51081, 
    51082, 51083, 51085, 51086, 51087, 
    51088, 51089, 51090, 51091, 51092, 
    51093, 51095, 51096, 51097, 51098, 
    51099, 51100, 51101, 51102, 51103, 
    51105, 51121, 51122, 51123, 51125, 
    51126, 51127, 51128, 51129, 51152, 
    51153, 51154, 51155, 51156, 51157, 
    51158, 51159, 51160, 51172, 51173, 
    51174, 51176, 51296, 51297, 51298, 
    51299, 51300, 51301, 51302, 51303, 
    51304, 51305, 51306, 51307, 51308, 
    51309, 51316, 51317, 51318, 51319, 
    51320, 51321, 51322, 51323, 51324, 
    51370, 51371, 51372, 51373, 51443, 
    51452, 51453, 51496, 51497, 51498, 
    51564, 51565, 51566, 51567, 51568, 
    51569, 51570, 51571, 51572, 51573, 
    51574, 51575, 51576, 51577, 51578, 
    51579, 51580, 51581, 51582, 51583, 
    51584, 51585, 51586
  )

Query time 0.00123

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "138.21"
    },
    "table": {
      "table_name": "cscart_warehouses_sum_products_amount",
      "access_type": "range",
      "possible_keys": [
        "PRIMARY"
      ],
      "key": "PRIMARY",
      "used_key_parts": [
        "product_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 241,
      "rows_produced_per_join": 241,
      "filtered": "100.00",
      "index_condition": "(`test_uchur_k`.`cscart_warehouses_sum_products_amount`.`product_id` in (21,46,48,49,50,51,53,91,92,105,129,138,139,21567,22712,22713,22714,22715,22716,50989,51081,51082,51083,51085,51086,51087,51088,51089,51090,51091,51092,51093,51095,51096,51097,51098,51099,51100,51101,51102,51103,51105,51121,51122,51123,51125,51126,51127,51128,51129,51152,51153,51154,51155,51156,51157,51158,51159,51160,51172,51173,51174,51176,51296,51297,51298,51299,51300,51301,51302,51303,51304,51305,51306,51307,51308,51309,51316,51317,51318,51319,51320,51321,51322,51323,51324,51370,51371,51372,51373,51443,51452,51453,51496,51497,51498,51564,51565,51566,51567,51568,51569,51570,51571,51572,51573,51574,51575,51576,51577,51578,51579,51580,51581,51582,51583,51584,51585,51586))",
      "cost_info": {
        "read_cost": "114.11",
        "eval_cost": "24.10",
        "prefix_cost": "138.21",
        "data_read_per_join": "3K"
      },
      "used_columns": [
        "product_id",
        "amount"
      ]
    }
  }
}

Result

product_id amount
21 2
21 2
46 16
46 16
48 1
48 1
49 1
49 1
50 4
50 4
51 4
51 4
53 5
53 5
91 1
91 1
92 1
92 1
105 25
105 25
129 3
129 3
138 9
138 9
139 7
139 7
22712 5
22712 5
22713 4
22713 4
22714 4
22714 4
22715 2
22715 2
22716 5
22716 5
50989 13
50989 13
51081 8
51081 8
51082 8
51082 8
51083 3
51083 3
51085 1
51085 1
51086 7
51086 7
51087 7
51087 7
51088 4
51088 4
51089 2
51089 2
51090 1
51090 1
51091 7
51091 7
51092 3
51092 3
51093 6
51093 6
51095 1
51095 1
51096 8
51096 8
51097 8
51097 8
51098 5
51098 5
51099 2
51099 2
51100 2
51100 2
51101 8
51101 8
51102 6
51102 6
51103 5
51103 5
51105 2
51105 2
51121 2
51121 2
51122 1
51122 1
51123 2
51123 2
51125 5
51125 5
51126 5
51126 5
51127 3
51127 3
51128 2
51128 2
51129 2
51129 2
51152 2
51152 2
51153 2
51153 2
51154 3
51154 3
51155 1
51155 1
51156 8
51156 8
51157 6
51157 6
51158 6
51158 6
51159 4
51159 4
51160 5
51160 5
51172 3
51172 3
51173 3
51173 3
51174 1
51174 1
51176 1
51176 1
51296 3
51296 3
51297 3
51297 3
51298 1
51298 1
51299 3
51299 3
51300 3
51300 3
51301 8
51301 8
51302 12
51302 12
51303 6
51303 6
51304 7
51304 7
51305 3
51305 3
51306 3
51306 3
51307 4
51307 4
51308 3
51308 3
51309 2
51309 2
51316 8
51316 8
51317 7
51317 7
51318 5
51318 5
51319 5
51319 5
51320 6
51320 6
51321 8
51321 8
51322 7
51322 7
51323 5
51323 5
51324 5
51324 5
51370 18
51370 18
51371 25
51371 25
51372 15
51372 15
51373 13
51373 13
51443 4
51443 4
51452 8
51452 8
51453 10
51453 10
51496 30
51496 30
51497 30
51497 30
51498 30
51498 30
51564 1
51564 1
51565 1
51565 1
51566 2
51566 2
51567 2
51567 2
51568 2
51568 2
51569 2
51569 2
51570 2
51570 2
51571 2
51571 2
51572 1
51572 1
51573 1
51573 1
51574 2
51574 2
51575 2
51575 2
51576 3
51576 3
51577 1
51577 1
51578 2
51578 2
51579 1
51579 1
51580 1
51580 1
51581 1
51581 1
51582 4
51582 4
51583 6
51583 6
51584 4
51584 4
51585 2
51585 2
51586 1
51586 1