If you just started your system, it may be searching for updates which creates the lock. Make sure you have not another instance of apt, apt-get or aptitude running in the background:
ps aux | grep -e apt -e dpkg | grep -v grep
If this command return some process, like in this example where I'm running synaptic package manager as a test:
ps aux | grep -e apt -e dpkg | grep -v grep
darent 5578 0.0 0.0 10948 968 ? S 16:24 0:00 /bin/sh /usr/bin/synaptic-pkexec
root 5579 20.0 1.0 814300 173360 ? Sl 16:24 0:03 /usr/sbin/synaptic
You may have two options. Wait until the process finishes (keep repeating the command until there's no output) or kill it taking note of the number and executing:
sudo kill 5578 5579
With the number of the proces or processes. This will kill the process in a "clean" way. If it refuses to exit, you can force it adding the switch -9 to the order:
sudo kill -9 5578 5579
But I'd recommend the first one just in case. Then, run the upgrade again:
sudo apt-get update && sudo apt-get upgrade