updating woocommerce order in checkout page instead to create a new one

Solution:

You can use the function wc_update_order() to fetch an existing order object.

$order_id = $_GET[ 'order_id' ]
$order = wc_update_order( array ( 'order_id' => $order_id ) );

// now you got the woocommerce order object and you can execute many functions
//
$address = array(
        'first_name' => 'Fresher',
        'last_name'  => 'StAcK OvErFloW',
        'company'    => 'stackoverflow',
        'email'      => 'test@test.com',
        'phone'      => '777-777-777-777',
        'address_1'  => '31 Main Street',
        'address_2'  => '', 
        'city'       => 'Chennai',
        'state'      => 'TN',
        'postcode'   => '12345',
        'country'    => 'IN'
    );

$order->add_product( get_product( '12' ), 1 ); //(get_product with id and next is for quantity)
$order->set_address( $address, 'billing' );
$order->set_address( $address, 'shipping' );
$order->calculate_totals();

For a complete list of all the functions you can call on the order object, execute the following code after you fetch your order

var_dump( get_class_methods( $order ) );

This will list all the functions that are available to the Woocommerce Order object.

Hope this answers your question