update ec_orders set user_id=:user_id, user_session_id=null, saved_p='t' where user_session_id=:user_session_id and order_state='in_basket'