For common protocols like HTTP, FTP, SSH you can modify the default timeout value by specifying the application with a timeout value, just used the exact same name that the Junos predefined is.
For other protocols like sql even thought they are predifined the system wont let you overide the timeouts. What you need to do is create a custom app then set a protocol timeout of your choice. I just usually add the business name to the protocol so I know its my custom app. After you create the custom app you need to reference it in policy. If your policy still uses any as the application it will use the system default timeout.
Here are some examples
Changing SSH timeoute (Notice i use the same name as the predefined app)
user@srx# set applications application junos-ssh inactivity-timeout 3600
Changing SQL
user@srx# set applications application Company_mysql protocol tcp
user@srx# set applications application Company_mysql destination-port 3306
user@srx# set applications application Company_mysql inactivity-timeout 3600
Make sure you now create a policy that will reference this custom APP
To see a list of the pre-defined apps just do this
user@srx> show configuration groups junos-defaults applications