Problems installing nitrokey app (Ubuntu)

I am encountering an issue installing the nitrokey app on Ubuntu. I have entered the following command:

sudo apt-get update && sudo apt-get install libccid
It returned an error message saying
E: could not get lock /var/lib/dpkg/lock-frontend. It is held by process 4211 (unattended-upgr)

N: be aware that removing the lock file is not a solution and may break your system.

E: unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Seeing the error message, it is very likely that you have unattended upgrade enabled (which is the default, I would assume).
As long as it is upgrading your system, you cannot install new software with apt.
Once the upgrade is done, you should be able to install libccid.

Ok that makes sense since I tried to update the OS software. However it said it was unable to update and to check my internet connection. My connection was fineā€¦ what could it be then? This is consistently a problem when I try to update.