SELECT 
  product_id 
FROM 
  cscart_product_popularity 
WHERE 
  product_id IN (
    40584, 40583, 40586, 40589, 40587, 40590, 
    40591, 40588, 40585
  )

Query time 0.00073

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_product_popularity",
          "access_type": "range",
          "possible_keys": ["PRIMARY", "total"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["product_id"],
          "rows": 9,
          "filtered": 100,
          "attached_condition": "cscart_product_popularity.product_id in (40584,40583,40586,40589,40587,40590,40591,40588,40585)",
          "using_index": true
        }
      }
    ]
  }
}

Result

product_id
40583
40584
40585
40586
40587
40588
40589
40590
40591