SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_sum_products_amount 
WHERE 
  1 
  AND product_id IN (
    51567, 51565, 51564, 139, 129, 51566, 
    51301, 51, 50, 51497, 51498, 53, 22713, 
    21, 22714, 22712, 46, 22715, 22716, 
    51496, 21567, 91, 50989, 47, 105, 48, 
    49, 92, 137, 88, 126, 31, 51358, 115, 
    37, 11, 140, 41, 30, 90, 38, 124, 81, 56, 
    135, 82, 116, 117, 125, 106, 39, 193, 
    65, 40, 22710, 22711, 17, 57, 122, 58, 
    5, 22, 18, 27
  )

Query time 0.00100

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "71.81"
    },
    "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": 124,
      "rows_produced_per_join": 124,
      "filtered": "100.00",
      "index_condition": "(`test_uchur_k`.`cscart_warehouses_sum_products_amount`.`product_id` in (51567,51565,51564,139,129,51566,51301,51,50,51497,51498,53,22713,21,22714,22712,46,22715,22716,51496,21567,91,50989,47,105,48,49,92,137,88,126,31,51358,115,37,11,140,41,30,90,38,124,81,56,135,82,116,117,125,106,39,193,65,40,22710,22711,17,57,122,58,5,22,18,27))",
      "cost_info": {
        "read_cost": "59.41",
        "eval_cost": "12.40",
        "prefix_cost": "71.81",
        "data_read_per_join": "1K"
      },
      "used_columns": [
        "product_id",
        "amount"
      ]
    }
  }
}

Result

product_id amount
5 13
5 13
11 100
11 100
17 32
17 32
18 34
18 34
21 2
21 2
22 8
22 8
27 4
27 4
30 4
30 4
31 3
31 3
37 1
37 1
38 2
38 2
39 3
39 3
40 3
40 3
41 3
41 3
46 16
46 16
47 5
47 5
48 1
48 1
49 1
49 1
50 4
50 4
51 4
51 4
53 5
53 5
56 103
56 103
57 35
57 35
58 35
58 35
65 1
65 1
81 31
81 31
88 18
88 18
90 1
90 1
91 1
91 1
92 1
92 1
105 25
105 25
106 22
106 22
115 7
115 7
116 3
116 3
117 13
117 13
122 30
122 30
124 7
124 7
125 6
125 6
126 108
126 108
129 3
129 3
135 6
135 6
137 1
137 1
139 7
139 7
140 7
140 7
22710 16
22710 16
22711 12
22711 12
22712 5
22712 5
22713 4
22713 4
22714 4
22714 4
22715 2
22715 2
22716 5
22716 5
50989 13
50989 13
51301 8
51301 8
51358 9
51358 9
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