BackendUtility::lockRecords throws warnings with PHP 5.4
$GLOBALS['BE_USER']->user['uid'] is accessed even if a user
is not logged in which leads to a "Illegal String offset" warning.
Additionally a delete query is executed in this case which
does not make sense at all.
Properly check if a user is logged in before executing any
functionality in this method.