Fetch User Meta Data

All of this can be done using WP_User_Query:

$users = new WP_User_Query(array(
    meta_query(
        array( 'key' => 'login_status', 'value' => '0' ),
        array( 'key' => 'active_code', 'value' => '3f7431e226893f16cbe44424850d00ad' )
    )
));

This will return a list of users that meet your requirements. Then you can get the ids like so:

$user_ids = wp_list_pluck( $users->get_results(), 'ID' );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)