Step 1. Re-create the OroCRM database (because it could be broken).
mysql -e "DROP DATABASE crm; CREATE DATABASE crm;"
Step 2. Re-run the «app/console oro:install» command with the additional «–timeout=0» key
app/console oro:install --env=prod --timeout=0