You can add this code to the my.cnf file
[mysqld]
innodb_lock_wait_timeout = 600
Or, you can try
sudo mysql -u root -p
SET GLOBAL innodb_lock_wait_timeout = 600;
SET SESSION innodb_lock_wait_timeout = 600;
But after you restart MySQL service. it may back to previous value.