How can i change the nicename and the displayname in a bulk in the database?

I do not think you can do it through db directly as for example user_email is a static value, you do not loop into all the users.

You’ll need to do it through PHP. I’ve written the snippet below, but without tested it, you should test it on a safe environment with backuping before executing it:

add_action( 'admin_init', 'sof_update_users' ); // will be run on wp-admin launch
function sof_update_users(){
    // if users have already been updated, bail.
    if ( '1' === get_option( 'user_updated' ) ){
        return;
    }
    $users = get_users(); // get all users registered
    foreach ( $users as $user ){ //loop in users
        $userdata = get_userdata( $user->user_id); //get data by user ID 
        if( is_email( $userdata->user_login ) ){ 
            wp_update_user( array( 'ID' => $user->user_id, 'user_login' => $user->user_id )); // update user login
        }
    }
    update_option( 'user_updated', '1' ); // be sure to not run this on each admin load.
}