<PAGE>   1
                                                                   EXHIBIT 10.31



                   SECOND AMENDMENT TO OFFICE LEASE AGREEMENT

         THIS SECOND AMENDMENT TO OFFICE LEASE AGREEMENT (this "Second
Amendment") is made and entered into this 30th day of April, 1998 (the
"Effective Date"), between HYATT PLAZA LIMITED PARTNERSHIP, a Virginia limited
partnership ("Landlord"), and XYBERNAUT CORPORATION, a Delaware corporation,
formerly known as Computer Products and Services, Inc. ("Tenant"), with
reference to the following:

                                    RECITALS

         A.      Pursuant to the terms of that certain Office Lease Agreement
dated November 1, 1994 (the "Original Lease"), as amended by that certain First
Amendment to Office Lease Agreement dated July 1, 1997 (the "First Amendment")
(the Original Lease and First Amendment are hereinafter collectively referred
to as the "Lease"), by and between Landlord and Tenant, Landlord has leased to
Tenant certain premises, more particularly described therein. All capitalized
terms used in this Second Amendment shall, unless defined herein, have the same
meaning and definition as used in the Lease.

         B.      Landlord and Tenant have agreed to amend certain terms and
provisions of the Lease.

                 NOW, THEREFORE, for good and valuable consideration, the
receipt and sufficiency of which are hereby acknowledged, Landlord and Tenant
agree as follows:

         1.      As of midnight on the Effective Date, Landlord and Tenant
shall reduce the size of the Premises by 2,283 square feet by removing that
certain portion of the Premises on the fourth (4th) floor of the Building (the
"Released Premises") as the same is more particularly described on Exhibit "A"
attached hereto and by this reference made a part hereof.

         2.      Tenant shall vacate the Released Premises as of the Effective
Date and shall leave the Released Premises in a broom clean condition. From and
after the Effective Date, Landlord and Tenant will be relieved and released
from any liability to the other arising under the Lease after the Effective Date
as the same relates solely to the Released Premises. Notwithstanding the
foregoing sentence, Tenant specifically acknowledges that (i) Tenant shall not
be released from and shall remain liable to Landlord for all Rent accruing
under the Lease prior to the Effective Date and (ii) Landlord reserves all
rights and remedies under the Lease for the non-payment of such Rent.

         3.      From and after the Effective Date, the following terms shall
have the following meanings:

                 (a)      Premises:     7,276 rentable square feet located on
the first (1st) and fifth (5th) floors of the Building as the same is more
particularly shown on Exhibit "B" attached hereto and made a part hereof.

                 (b)      Tenant's Proportionate Share: 2.92%





                                       1





<PAGE>   2
         4.      Except as expressly modified by this Second Amendment, the
Lease remains unchanged and in full force and effect.

         IN WITNESS WHEREOF, Landlord and Tenant have executed this Second
Amendment as of the day and year first above written.


                             LANDLORD:
                             -------- 

                             HYATT PLAZA LIMITED PARTNERSHIP
                             a Virginia limited partnership


                             By:     FAIR LAKES HYATT LIMITED
                                     PARTNERSHIP, a Virginia limited
                                     partnership, its general partner

                             By:     Fair Lakes of Virginia, Inc., a Virginia
                                     corporation, its general partner


                             By:         /s/ JAMES W. TODD              
                                     -----------------------------------
                             Name:       James W. Todd                  
                                     -----------------------------------
                             Title:      VICE PRESIDENT                 
                                     -----------------------------------


                             TENANT:
                             ------ 

                             XYBERNAUT CORPORATION, formerly known as
                             Computer Products and Services, Inc.
                             a Delaware corporation


                             By:           /s/ ED NEWMAN                
                                     -----------------------------------
                             Name:         ED NEWMAN                    
                                     -----------------------------------
                             Title:        PRESIDENT                     
                                     -----------------------------------






                                       2
<PAGE>   3
                                                                      EXHIBIT A




                          [MAP OF HYATT PLAZA FLOOR 4]
<PAGE>   4
                                                                      EXHIBIT B





                          [MAP OF HYATT PLAZA FLOOR 1]
<PAGE>   5
                                                                      EXHIBIT B





                          [MAP OF HYATT PLAZA FLOOR 5]