You could watch out for an automation solution. I e.g. use Tasker for a lot of things like that (yeah, it's EUR 5 -- but you can obtain a free 7-day trial at the project page, and according to the dev even make it work another 7 days by exporting its settings, uninstall, reinstall, import settings). Rawly described: You combine events/conditions with tasks. In your case, you'd e.g. set the default timeout to 30s, and have Tasker take care for specialities:
- Profile "Reading":
- Condition: App running (Browser, eBook-Reader, ... -- make your choices)
- Task: Set screen timeout to 2min (automatically reverts when condition is no longer met)
- Profile "LockScreen":
- Condition: [Screenlock On]
- Task: Timeout 15s
You've got the idea. Unfortunately (as indicated by the square brackets), Tasker seems to have no condition for "Screenlock active" (or I did not find it), so this might require some addon (Locale addons are compatible). Nevertheless, you've got the idea -- and there are other automation solutions out there on the Playstore which might do the job to your liking, and even may be cheaper. I'd look out for addons, then check Llama - Location Profiles etc. as well.