wordpress查询无法用空间搜索数据?

I have following code

$wpdb->get_results( 'SELECT * FROM '.$device_token_table.' WHERE user_pushtoken="'.$server_method['user_pushtoken'].'"  AND user_id = '.$user_id,ARRAY_A );
print_r($wpdb->num_rows);

I run this query into MySql and it works and 1 row found but when I try this into wordpress then it is not working and 0 rows found.

Issue is spaces between XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX. I can not remove this spaces. I want to run this query into wordpress.

How can I run this query successfully?