I can think of at least two ways but one is more trouble than it's probably worth and the other is inherently risky.
1)
You can delete the program on its 29th day and scrub all references to it from your machine's cache, registry, etc. DO NOT attempt this one in a half-assed fashion because messing with your computer's registry and other core libraries can have potentially disastrous consequences. Then reinstall the program and enjoy it for another 29 days. Repeat. Repeat. Repeat. Repea...
2)
Find and download a registration crack or a pre-cracked version of the software. Needless to say this a good method to acquire malware along with the program you originally wanted so unless you trust the source of the crack make sure you have a good backup of your machine and everything on it.
Personally I've found it's far less hassle to use open source (usually free to use) software or just bite the damn bullet and purchase a registration if it's a program I absolutely must have.
Open source and/or free programs/suites offer everything from MSOffice clones (OpenOffice) to audio and video editors (Audacity & HitFilmExpress) to coding utilities (VisualStudioCode) to 3D modeling/rendering (Blender).
What is it you're trying to extend?
Has anyone ever done this?
I installed a program the other day but it says its a trial and will expire in 30 days.
Is there a way to easily extend it so it never does?