You cannot extend the trial. You can license the full product by getting a paid-for license key, then in Central Administration > Upgrade and Migration > Convert Farm License Type. Enter the  product key > Upgrade. Now the license and expiration date are held within the Configuration database, the only way to "extend" a trial is to rebuild the farm from scratch.

Or you can follow below unsupported method.

There is a way we can modifying your SQL Server databases. This is an unsupported method so make sure you backup your config database first before continuing.

1. To do so follow below steps: Open SQL server management studio > connect your SQL instance. 

2. Right click your configuration database (Which by default should be ‘SharePoint_Config’ ) > Select “New Query” on top.

3. Copy paste below query in the new query window

UPDATE Objects
SET Properties = Replace(Properties, 9223372036854775807, 92233720368547758)
WHERE ClassId = '4274DBC4-7D52-474F-961B-58D84F5C28FF'

4. Execute this query from top.

5. Now go to Central Administration > Upgrade and Migration > Convert farm license type. You should be able to input your new Product Key now and hit OK.