it seems that there is some process using the lock and thats why you cant get update.
to view this pending process type command
ps aux | grep apt
this will show all processes containing the word apt
now the process which is pending is one of them.
now you need to judge which is pending and kill that process by typing command
sudo kill process-number
sudo kill -9 process-number
this will end the process and you are ready to update
if this does not work then your sudo do not sufficient permissions. thus you need to do this process as a root. to become a root you need to set password for root and to this type command
then enter your sudo password and then enter password for UNIX (root) password which will set to your root user.now type command
su and then enter the unix(root) password which we set earlier and then try to update