It's Java.
Get the Android SDK, make your own little app with the code in it (maybe a little input box so you can enter whatever timeout value you want), push to your device, run!
The
settings themselves are stored using sqllite, so it should be possible to change them from console or adb shell.
$ adb shell
#sqlite3 /data/data/com.android.providers.settings/databases/settings.db
#update system set value='3600000' where name='screen_off_timeout'
Will set the timeout to 1 hour.
ADB shell is part of the
SDK, you can access your phone through a USB cable. You can also get
Terminal Emulator from the Play Store get right at the linux insides of your device and
run the sqllite3 cli from there.