SELECT *
FROM users AS a,
     friendships AS b
WHERE a.userId      = b.activeId AND
      b.passiveId   = /*passiveId*/0 AND
      a.foreignKey  = /*activeId*/'' AND
      b.removedTime = 0
LIMIT 0, 1
