Locks MySQL's tables for specified time