A lot of errors about a lock thing when I try to import my database

Hello guys.
I am trying to import a database but I am getting a lot of errors about a LOCK command.
Any ideas?
Here is a sample of the file with the line that produces the error :

– Dumping data for table carts

LOCK TABLES carts WRITE;

/*!40000 ALTER TABLE carts DISABLE KEYS */;

/*!40000 ALTER TABLE carts ENABLE KEYS */;

UNLOCK TABLES;