In magento 2, Admin session is set 900 seconds. If need to change this value, please follow the below steps:

1) Go Stores->Settings->Configuration->Advanced->Admin->Security->Admin Session Lifetime (seconds)
2) Change 900 to 3600 seconds ( 1 hour )
3) Then click 'Save Config' Button
How do run security patch in magento ?

1) Download security patch what you want to install from https://magento.com/tech-resources/downloads/magento/
2) Place security patch in root folder
3) run command "sh security-patch-file-pth" ( for ex: sh PATCH_SUPEE-9652_v2-2017-02-07-01-18-38.sh )

if need more details, follow the below link

http://devdocs.magento.com/guides/m1x/other/ht_install-patches.html