Is it possible to set how long the lock screen will disappear on the iPhone? Sometimes on the lock screen of the iPhone there is a Notification I'd like to look at and copy data from. But the lock screen seems to disappear within 5 seconds.

There is a way to set the screen to dim down and disappear after 1 minute or 5 minutes, but doesn't seem to have one for the lock screen.  Is there a way to set it to disappear after 20 or 30 seconds?
There is no setting to customise this. The only solution would be to do a screen action so it stays on for longer. Like, swipe up to see your notifications or press the Home Button to the passcode screen and return to the wallpaper screen.

On iOS 12 there is a solution. Unlock your phone, swipe down from the top and view your notifications from there. On this screen the iPhone will dim according to your Autolock settings which can be changed in Settings -> Display &amp; Brightness -> Autolock.